diff options
| author | Jane Lusby <jlusby42@gmail.com> | 2019-06-04 17:32:03 -0700 |
|---|---|---|
| committer | Jane Lusby <jlusby42@gmail.com> | 2019-06-12 12:29:37 -0700 |
| commit | cf88c8487a2f827f8af0a369a63b3601e4c9f04c (patch) | |
| tree | fc7d89240b434bd812e0e2a8b2b7ebe93ed3cde6 /clippy_dev/src | |
| parent | a1eb60f8ea46c99cab2be80772915506b4ce9cee (diff) | |
| download | rust-cf88c8487a2f827f8af0a369a63b3601e4c9f04c.tar.gz rust-cf88c8487a2f827f8af0a369a63b3601e4c9f04c.zip | |
initial commit for help improvements on clippy-driver
Diffstat (limited to 'clippy_dev/src')
| -rw-r--r-- | clippy_dev/src/main.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/clippy_dev/src/main.rs b/clippy_dev/src/main.rs index 45d4d13ed86..1c3c53ad49f 100644 --- a/clippy_dev/src/main.rs +++ b/clippy_dev/src/main.rs @@ -87,6 +87,28 @@ fn print_lints() { fn update_lints(update_mode: &UpdateMode) { let lint_list: Vec<Lint> = gather_all().collect(); + + std::fs::write( + "../src/lintlist.rs", + &format!( + "\ +/// Lint data parsed from the Clippy source code. +#[derive(Clone, PartialEq, Debug)] +pub struct Lint {{ + pub name: &'static str, + pub group: &'static str, + pub desc: &'static str, + pub deprecation: Option<&'static str>, + pub module: &'static str, +}} + +pub const ALL_LINTS: [Lint; {}] = {:#?};", + lint_list.len(), + lint_list + ), + ) + .expect("can write to file"); + let usable_lints: Vec<Lint> = Lint::usable_lints(lint_list.clone().into_iter()).collect(); let lint_count = usable_lints.len(); |
