Skip to content

Commit 629aeb1

Browse files
authored
Merge pull request #2621 from rust-lang/tshepang/sembr-help
sembr tool: add some hints on usage
2 parents 7f1a1b2 + 8654d0e commit 629aeb1

File tree

1 file changed

+5
-2
lines changed
  • src/doc/rustc-dev-guide/ci/sembr/src

1 file changed

+5
-2
lines changed

src/doc/rustc-dev-guide/ci/sembr/src/main.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ use regex::Regex;
1010

1111
#[derive(Parser)]
1212
struct Cli {
13-
root_dir: PathBuf,
13+
/// File or directory to check
14+
path: PathBuf,
1415
#[arg(long)]
16+
/// Modify files that do not comply
1517
overwrite: bool,
18+
/// Applies to lines that are to be split
1619
#[arg(long, default_value_t = 100)]
1720
line_length_limit: usize,
1821
#[arg(long)]
@@ -31,7 +34,7 @@ fn main() -> Result<()> {
3134
let mut compliant = Vec::new();
3235
let mut not_compliant = Vec::new();
3336
let mut made_compliant = Vec::new();
34-
for result in Walk::new(cli.root_dir) {
37+
for result in Walk::new(cli.path) {
3538
let entry = result?;
3639
if entry.file_type().expect("no stdin").is_dir() {
3740
continue;

0 commit comments

Comments
 (0)