@@ -17,7 +17,7 @@ use std::path::Path;
1717pub mod rules;
1818pub use rules:: LINTS ;
1919
20- const LINT_GROUPS : & [ LintGroup ] = & [
20+ pub const LINT_GROUPS : & [ LintGroup ] = & [
2121 COMPLEXITY ,
2222 CORRECTNESS ,
2323 NURSERY ,
@@ -269,62 +269,71 @@ pub struct LintGroup {
269269 pub default_level : LintLevel ,
270270 pub desc : & ' static str ,
271271 pub feature_gate : Option < & ' static Feature > ,
272+ pub hidden : bool ,
272273}
273274
274275const COMPLEXITY : LintGroup = LintGroup {
275276 name : "complexity" ,
276277 desc : "code that does something simple but in a complex way" ,
277278 default_level : LintLevel :: Warn ,
278279 feature_gate : None ,
280+ hidden : false ,
279281} ;
280282
281283const CORRECTNESS : LintGroup = LintGroup {
282284 name : "correctness" ,
283285 desc : "code that is outright wrong or useless" ,
284286 default_level : LintLevel :: Deny ,
285287 feature_gate : None ,
288+ hidden : false ,
286289} ;
287290
288291const NURSERY : LintGroup = LintGroup {
289292 name : "nursery" ,
290293 desc : "new lints that are still under development" ,
291294 default_level : LintLevel :: Allow ,
292295 feature_gate : None ,
296+ hidden : false ,
293297} ;
294298
295299const PEDANTIC : LintGroup = LintGroup {
296300 name : "pedantic" ,
297301 desc : "lints which are rather strict or have occasional false positives" ,
298302 default_level : LintLevel :: Allow ,
299303 feature_gate : None ,
304+ hidden : false ,
300305} ;
301306
302307const PERF : LintGroup = LintGroup {
303308 name : "perf" ,
304309 desc : "code that can be written to run faster" ,
305310 default_level : LintLevel :: Warn ,
306311 feature_gate : None ,
312+ hidden : false ,
307313} ;
308314
309315const RESTRICTION : LintGroup = LintGroup {
310316 name : "restriction" ,
311317 desc : "lints which prevent the use of Cargo features" ,
312318 default_level : LintLevel :: Allow ,
313319 feature_gate : None ,
320+ hidden : false ,
314321} ;
315322
316323const STYLE : LintGroup = LintGroup {
317324 name : "style" ,
318325 desc : "code that should be written in a more idiomatic way" ,
319326 default_level : LintLevel :: Warn ,
320327 feature_gate : None ,
328+ hidden : false ,
321329} ;
322330
323331const SUSPICIOUS : LintGroup = LintGroup {
324332 name : "suspicious" ,
325333 desc : "code that is most likely wrong or useless" ,
326334 default_level : LintLevel :: Warn ,
327335 feature_gate : None ,
336+ hidden : false ,
328337} ;
329338
330339/// This lint group is only to be used for testing purposes
@@ -333,6 +342,7 @@ const TEST_DUMMY_UNSTABLE: LintGroup = LintGroup {
333342 desc : "test_dummy_unstable is meant to only be used in tests" ,
334343 default_level : LintLevel :: Allow ,
335344 feature_gate : Some ( Feature :: test_dummy_unstable ( ) ) ,
345+ hidden : true ,
336346} ;
337347
338348#[ derive( Copy , Clone , Debug ) ]
0 commit comments