lintcheck: add -j <N> option to configure threads.

defaults to 1
-j 0 choses the number of threads automtically (= number of physical cores)
This commit is contained in:
Matthias Krüger
2021-02-19 23:20:05 +01:00
parent 22aeec09e4
commit 8499a32859
2 changed files with 38 additions and 6 deletions

View File

@@ -69,6 +69,14 @@ fn get_clap_config<'a>() -> ArgMatches<'a> {
.value_name("CRATES-SOURCES-TOML-PATH")
.long("crates-toml")
.help("set the path for a crates.toml where lintcheck should read the sources from"),
)
.arg(
Arg::with_name("threads")
.takes_value(true)
.value_name("N")
.short("j")
.long("jobs")
.help("number of threads to use, 0 automatic choice"),
);
let app = App::new("Clippy developer tooling")