@@ -772,6 +772,20 @@ define_Conf! {
772772 /// exported visibility, or whether they are marked as "pub".
773773 #[ lints( pub_underscore_fields) ]
774774 pub_underscore_fields_behavior: PubUnderscoreFieldsBehaviour = PubUnderscoreFieldsBehaviour :: PubliclyExported ,
775+ /// Whether to include functions outside of `#[cfg(test)]` in the linting process or not.
776+ ///
777+ /// This option allows running the lint against the integration tests: test functions located
778+ /// there are not inside a node marked with `#[cfg(test)]` annotation (although they are
779+ /// still marked using `#[test]` annotation and thus can have redundant "test_" prefix).
780+ #[ lints( redundant_test_prefix) ]
781+ redundant_test_prefix_check_outside_cfg_test: bool = false ,
782+ /// What suffix to use to avoid function name collisions when `test_` prefix is removed.
783+ ///
784+ /// If set to `"_works"`, the lint will suggest renaming `test_foo` to `foo_works`.
785+ /// Suffix is added only when there is a collision with an existing function name,
786+ /// otherwise just `test_` prefix is removed (and no suffix added).
787+ #[ lints( redundant_test_prefix) ]
788+ redundant_test_prefix_custom_suffix: String = String :: from( "_works" ) ,
775789 /// Whether to lint only if it's multiline.
776790 #[ lints( semicolon_inside_block) ]
777791 semicolon_inside_block_ignore_singleline: bool = false ,
@@ -846,16 +860,6 @@ define_Conf! {
846860 /// Whether to also emit warnings for unsafe blocks with metavariable expansions in **private** macros.
847861 #[ lints( macro_metavars_in_unsafe) ]
848862 warn_unsafe_macro_metavars_in_private_macros: bool = false ,
849- /// Whether to include integration tests in the linting process or not.
850- #[ lints( redundant_test_prefix) ]
851- redundant_test_prefix_in_integration_tests: bool = false ,
852- /// What suffix to use to avoid function name collisions when `test_` prefix is removed.
853- ///
854- /// If set to `"_works"`, the lint will suggest renaming `test_foo` to `foo_works`.
855- /// Suffix is added only when there is a collision with an existing function name,
856- /// otherwise just `test_` prefix is removed (and no suffix added).
857- #[ lints( redundant_test_prefix) ]
858- redundant_test_prefix_custom_suffix: String = String :: from( "_works" ) ,
859863}
860864
861865/// Search for the configuration file.
0 commit comments