File tree 2 files changed +1121
-1248
lines changed 2 files changed +1121
-1248
lines changed Original file line number Diff line number Diff line change @@ -88,10 +88,18 @@ fn print_lints() {
88
88
fn update_lints ( update_mode : & UpdateMode ) {
89
89
let lint_list: Vec < Lint > = gather_all ( ) . collect ( ) ;
90
90
91
+ let usable_lints: Vec < Lint > = Lint :: usable_lints ( lint_list. clone ( ) . into_iter ( ) ) . collect ( ) ;
92
+ let lint_count = usable_lints. len ( ) ;
93
+
94
+ let mut sorted_usable_lints = usable_lints. clone ( ) ;
95
+ sorted_usable_lints. sort_by_key ( |lint| lint. name . clone ( ) ) ;
96
+
91
97
std:: fs:: write (
92
98
"../src/lintlist.rs" ,
93
99
& format ! (
94
100
"\
101
+ //! This file is managed by util/dev update_lints. Do not edit.
102
+
95
103
/// Lint data parsed from the Clippy source code.
96
104
#[derive(Clone, PartialEq, Debug)]
97
105
pub struct Lint {{
@@ -103,15 +111,12 @@ pub struct Lint {{
103
111
}}
104
112
105
113
pub const ALL_LINTS: [Lint; {}] = {:#?};\n " ,
106
- lint_list . len( ) ,
107
- lint_list
114
+ sorted_usable_lints . len( ) ,
115
+ sorted_usable_lints
108
116
) ,
109
117
)
110
118
. expect ( "can write to file" ) ;
111
119
112
- let usable_lints: Vec < Lint > = Lint :: usable_lints ( lint_list. clone ( ) . into_iter ( ) ) . collect ( ) ;
113
- let lint_count = usable_lints. len ( ) ;
114
-
115
120
let mut file_change = replace_region_in_file (
116
121
"../README.md" ,
117
122
r#"\[There are \d+ lints included in this crate!\]\(https://rust-lang.github.io/rust-clippy/master/index.html\)"# ,
You can’t perform that action at this time.
0 commit comments