Some more documentation for clippy_dev

This commit is contained in:
Philipp Hansch 2018-10-15 20:47:19 +02:00
parent 7da97a94df
commit fb830c53db
No known key found for this signature in database
GPG key ID: B6FA06A6E0E2665B

View file

@ -36,6 +36,7 @@ lazy_static! {
pub static ref DOCS_LINK: String = "https://rust-lang-nursery.github.io/rust-clippy/master/index.html".to_string();
}
/// Lint data parsed from the Clippy source code.
#[derive(Clone, PartialEq, Debug)]
pub struct Lint {
pub name: String,
@ -67,6 +68,7 @@ impl Lint {
}
}
/// Gathers all files in `src/clippy_lints` and gathers all lints inside
pub fn gather_all() -> impl Iterator<Item=Lint> {
lint_files().flat_map(|f| gather_from_file(&f))
}