@@ -22,7 +22,7 @@ mod configuration_snippet;
22
22
const DIFF_CONTEXT_SIZE : usize = 3 ;
23
23
24
24
// A list of files on which we want to skip testing.
25
- const SKIP_FILE_WHITE_LIST : & [ & str ] = & [
25
+ const FILE_SKIP_LIST : & [ & str ] = & [
26
26
"issue-3434/no_entry.rs" ,
27
27
"issue-3665/sub_mod.rs" ,
28
28
// Testing for issue-3779
@@ -88,16 +88,16 @@ where
88
88
. any ( |c| c. zip ( subpath. as_ref ( ) . components ( ) ) . all ( |( a, b) | a == b) )
89
89
}
90
90
91
- fn is_file_skip ( skip_file_white_list : & [ & str ] , path : & Path ) -> bool {
92
- skip_file_white_list
91
+ fn is_file_skip ( file_skip_list : & [ & str ] , path : & Path ) -> bool {
92
+ file_skip_list
93
93
. iter ( )
94
94
. any ( |file_path| is_subpath ( path, file_path) )
95
95
}
96
96
97
97
// Returns a `Vec` containing `PathBuf`s of files with an `rs` extension in the
98
98
// given path. The `recursive` argument controls if files from subdirectories
99
99
// are also returned.
100
- fn get_test_files ( path : & Path , recursive : bool , skip_file_white_list : & [ & str ] ) -> Vec < PathBuf > {
100
+ fn get_test_files ( path : & Path , recursive : bool , file_skip_list : & [ & str ] ) -> Vec < PathBuf > {
101
101
assert ! ( path. exists( ) , "{} does not exist" , path. display( ) ) ;
102
102
103
103
let mut files = vec ! [ ] ;
@@ -108,9 +108,9 @@ fn get_test_files(path: &Path, recursive: bool, skip_file_white_list: &[&str]) -
108
108
let entry = entry. expect ( "couldn't get `DirEntry`" ) ;
109
109
let path = entry. path ( ) ;
110
110
if path. is_dir ( ) && recursive {
111
- files. append ( & mut get_test_files ( & path, recursive, skip_file_white_list ) ) ;
111
+ files. append ( & mut get_test_files ( & path, recursive, file_skip_list ) ) ;
112
112
} else if path. extension ( ) . map_or ( false , |f| f == "rs" )
113
- && !is_file_skip ( skip_file_white_list , & path)
113
+ && !is_file_skip ( file_skip_list , & path)
114
114
{
115
115
files. push ( path) ;
116
116
}
@@ -184,7 +184,7 @@ fn system_tests() {
184
184
init_log ( ) ;
185
185
run_test_with ( & TestSetting :: default ( ) , || {
186
186
// Get all files in the tests/source directory.
187
- let files = get_test_files ( Path :: new ( "tests/source" ) , true , SKIP_FILE_WHITE_LIST ) ;
187
+ let files = get_test_files ( Path :: new ( "tests/source" ) , true , FILE_SKIP_LIST ) ;
188
188
let ( _reports, count, fails) = check_files ( files, & None ) ;
189
189
190
190
// Display results.
@@ -362,7 +362,7 @@ fn idempotence_tests() {
362
362
return ;
363
363
}
364
364
// Get all files in the tests/target directory.
365
- let files = get_test_files ( Path :: new ( "tests/target" ) , true , SKIP_FILE_WHITE_LIST ) ;
365
+ let files = get_test_files ( Path :: new ( "tests/target" ) , true , FILE_SKIP_LIST ) ;
366
366
let ( _reports, count, fails) = check_files ( files, & None ) ;
367
367
368
368
// Display results.
@@ -385,8 +385,8 @@ fn self_tests() {
385
385
if !is_nightly_channel ! ( ) {
386
386
return ;
387
387
}
388
- let skip_file_white_list = [ "target" , "tests" ] ;
389
- let files = get_test_files ( Path :: new ( "src" ) , true , & skip_file_white_list ) ;
388
+ let file_skip_list = [ "target" , "tests" ] ;
389
+ let files = get_test_files ( Path :: new ( "src" ) , true , & file_skip_list ) ;
390
390
391
391
let ( reports, count, fails) = check_files ( files, & Some ( PathBuf :: from ( "rustfmt.toml" ) ) ) ;
392
392
let mut warnings = 0 ;
0 commit comments