@@ -772,6 +772,20 @@ define_Conf! {
772
772
/// exported visibility, or whether they are marked as "pub".
773
773
#[ lints( pub_underscore_fields) ]
774
774
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" ) ,
775
789
/// Whether to lint only if it's multiline.
776
790
#[ lints( semicolon_inside_block) ]
777
791
semicolon_inside_block_ignore_singleline: bool = false ,
@@ -846,16 +860,6 @@ define_Conf! {
846
860
/// Whether to also emit warnings for unsafe blocks with metavariable expansions in **private** macros.
847
861
#[ lints( macro_metavars_in_unsafe) ]
848
862
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" ) ,
859
863
}
860
864
861
865
/// Search for the configuration file.
0 commit comments