@@ -289,9 +289,6 @@ mod schema {
289
289
( !prefix. is_empty ( ) ) . then ( || prefix. to_string ( ) )
290
290
} ) ) ,
291
291
)
292
- // Filter out rule gated behind `#[cfg(feature = "unreachable-code")]`, which is
293
- // off-by-default
294
- . filter ( |prefix| prefix != "RUF014" )
295
292
. sorted ( )
296
293
. map ( Value :: String )
297
294
. collect ( ) ,
@@ -407,40 +404,28 @@ pub mod clap_completion {
407
404
let prefix = l. common_prefix ( ) ;
408
405
( !prefix. is_empty ( ) ) . then ( || PossibleValue :: new ( prefix) . help ( l. name ( ) ) )
409
406
} )
410
- . chain (
411
- RuleCodePrefix :: iter ( )
412
- // Filter out rule gated behind `#[cfg(feature = "unreachable-code")]`, which is
413
- // off-by-default
414
- . filter ( |prefix| {
415
- format ! (
416
- "{}{}" ,
417
- prefix. linter( ) . common_prefix( ) ,
418
- prefix. short_code( )
419
- ) != "RUF014"
420
- } )
421
- . filter_map ( |prefix| {
422
- // Ex) `UP`
423
- if prefix. short_code ( ) . is_empty ( ) {
424
- let code = prefix. linter ( ) . common_prefix ( ) ;
425
- let name = prefix. linter ( ) . name ( ) ;
426
- return Some ( PossibleValue :: new ( code) . help ( name) ) ;
427
- }
428
-
429
- // Ex) `UP004`
430
- if is_single_rule_selector ( & prefix) {
431
- let rule = prefix. rules ( ) . next ( ) ?;
432
- let code = format ! (
433
- "{}{}" ,
434
- prefix. linter( ) . common_prefix( ) ,
435
- prefix. short_code( )
436
- ) ;
437
- let name: & ' static str = rule. into ( ) ;
438
- return Some ( PossibleValue :: new ( code) . help ( name) ) ;
439
- }
440
-
441
- None
442
- } ) ,
443
- ) ,
407
+ . chain ( RuleCodePrefix :: iter ( ) . filter_map ( |prefix| {
408
+ // Ex) `UP`
409
+ if prefix. short_code ( ) . is_empty ( ) {
410
+ let code = prefix. linter ( ) . common_prefix ( ) ;
411
+ let name = prefix. linter ( ) . name ( ) ;
412
+ return Some ( PossibleValue :: new ( code) . help ( name) ) ;
413
+ }
414
+
415
+ // Ex) `UP004`
416
+ if is_single_rule_selector ( & prefix) {
417
+ let rule = prefix. rules ( ) . next ( ) ?;
418
+ let code = format ! (
419
+ "{}{}" ,
420
+ prefix. linter( ) . common_prefix( ) ,
421
+ prefix. short_code( )
422
+ ) ;
423
+ let name: & ' static str = rule. into ( ) ;
424
+ return Some ( PossibleValue :: new ( code) . help ( name) ) ;
425
+ }
426
+
427
+ None
428
+ } ) ) ,
444
429
) ,
445
430
) )
446
431
}
0 commit comments