@@ -633,6 +633,20 @@ define_Conf! {
633
633
/// exported visibility, or whether they are marked as "pub".
634
634
#[ lints( pub_underscore_fields) ]
635
635
pub_underscore_fields_behavior: PubUnderscoreFieldsBehaviour = PubUnderscoreFieldsBehaviour :: PubliclyExported ,
636
+ /// Whether to include functions outside of `#[cfg(test)]` in the linting process or not.
637
+ ///
638
+ /// This option allows running the lint against the integration tests: test functions located
639
+ /// there are not inside a node marked with `#[cfg(test)]` annotation (although they are
640
+ /// still marked using `#[test]` annotation and thus can have redundant "test_" prefix).
641
+ #[ lints( redundant_test_prefix) ]
642
+ redundant_test_prefix_check_outside_cfg_test: bool = false ,
643
+ /// What suffix to use to avoid function name collisions when `test_` prefix is removed.
644
+ ///
645
+ /// If set to `"_works"`, the lint will suggest renaming `test_foo` to `foo_works`.
646
+ /// Suffix is added only when there is a collision with an existing function name,
647
+ /// otherwise just `test_` prefix is removed (and no suffix added).
648
+ #[ lints( redundant_test_prefix) ]
649
+ redundant_test_prefix_custom_suffix: String = String :: from( "_works" ) ,
636
650
/// Whether to lint only if it's multiline.
637
651
#[ lints( semicolon_inside_block) ]
638
652
semicolon_inside_block_ignore_singleline: bool = false ,
@@ -706,16 +720,6 @@ define_Conf! {
706
720
/// Whether to also emit warnings for unsafe blocks with metavariable expansions in **private** macros.
707
721
#[ lints( macro_metavars_in_unsafe) ]
708
722
warn_unsafe_macro_metavars_in_private_macros: bool = false ,
709
- /// Whether to include integration tests in the linting process or not.
710
- #[ lints( redundant_test_prefix) ]
711
- redundant_test_prefix_in_integration_tests: bool = false ,
712
- /// What suffix to use to avoid function name collisions when `test_` prefix is removed.
713
- ///
714
- /// If set to `"_works"`, the lint will suggest renaming `test_foo` to `foo_works`.
715
- /// Suffix is added only when there is a collision with an existing function name,
716
- /// otherwise just `test_` prefix is removed (and no suffix added).
717
- #[ lints( redundant_test_prefix) ]
718
- redundant_test_prefix_custom_suffix: String = String :: from( "_works" ) ,
719
723
}
720
724
721
725
/// Search for the configuration file.
0 commit comments