1 //! Tidy checks source code in this repository.
3 //! This program runs all of the various tidy checks for style, cleanliness,
4 //! etc. This is run by default on `make check` and as part of the auto
10 use std::path::PathBuf;
14 let path: PathBuf = env::args_os().nth(1).expect("need path to src").into();
15 let cargo: PathBuf = env::args_os().nth(2).expect("need path to cargo").into();
17 let args: Vec<String> = env::args().skip(1).collect();
20 let verbose = args.iter().any(|s| *s == "--verbose");
21 bins::check(&path, &mut bad);
22 style::check(&path, &mut bad);
23 errors::check(&path, &mut bad);
24 cargo::check(&path, &mut bad);
25 let collected = features::check(&path, &mut bad, verbose);
26 pal::check(&path, &mut bad);
27 unstable_book::check(&path, collected, &mut bad);
28 unit_tests::check(&path, &mut bad);
29 if !args.iter().any(|s| *s == "--no-vendor") {
30 deps::check(&path, &mut bad);
32 deps::check_whitelist(&path, &cargo, &mut bad);
33 extdeps::check(&path, &mut bad);
34 ui_tests::check(&path, &mut bad);
37 eprintln!("some tidy checks failed");