cargo workspace and recursive options
drahnr opened this issue · comments
Bernhard Schuster commented
Describe the bug
When using the subcmd fix
combined with -r
in a cargo workspace for a subtree, mistakes are not found
To Reproduce
Steps to reproduce the behaviour:
cargo spellcheck fix -r polkadot/node/overseer/overseer-gen/proc-macro/Cargo.toml
- fix spelling mistakes
Expected behavior
Please complete the following information:
- System: Fedora
- Obtained: cargo
- Version:
Additional context
cargo spellcheck fix polkadot/node/overseer/overseer-gen/proc-macro/src/parse_struct.rs
works just fine as expected.
Bernhard Schuster commented
The behavior between -r
and non-r
is equivalent:
[2021-05-27T07:20:32Z TRACE cargo_spellcheck::config::args] Derived action Fix from flags/args/cmds
[2021-05-27T07:20:32Z DEBUG cargo_spellcheck::config::args] Using /media/supersonic1t/projects/parity/polkadot/node/overseer/overseer-gen/proc-macro/Cargo.toml manifest as anchor file
[2021-05-27T07:20:32Z DEBUG cargo_spellcheck::config::args] Manifest dir found /media/supersonic1t/projects/parity/polkadot/node/overseer/overseer-gen/proc-macro/: No such file or directory (os error 2)
[2021-05-27T07:20:32Z INFO cargo_spellcheck::config::args] Attempting to use configuration file /media/supersonic1t/projects/parity/polkadot/.config/spellcheck.toml
[2021-05-27T07:20:32Z TRACE cargo_spellcheck::config::hunspell] Sanitized (/media/supersonic1t/projects/parity/polkadot/.config + .) -> /media/supersonic1t/projects/parity/polkadot/.config
[2021-05-27T07:20:32Z TRACE cargo_spellcheck::config::hunspell] Sanitized (/media/supersonic1t/projects/parity/polkadot/.config + /usr/share/myspell/) -> /usr/share/myspell
[2021-05-27T07:20:32Z TRACE cargo_spellcheck::config::args] Derived action Fix from flags/args/cmds
[2021-05-27T07:20:32Z DEBUG cargo_spellcheck] Executing: Fix with Config { dev_comments: false, skip_readme: false, hunspell: Some(HunspellConfig { lang: Lang5 { lang: eng, country: US }, search_dirs: SearchDirs(["/media/supersonic1t/projects/parity/polkadot/.config", "/usr/share/myspell"]), skip_os_lookups: false, use_builtin: false, extra_dictionaries: ["/media/supersonic1t/projects/parity/polkadot/.config/lingua.dic"], quirks: Quirks { transform_regex: [WrappedRegex(^'([^\s])'$), WrappedRegex(^[0-9]+(?:\.[0-9]*)?x$), WrappedRegex(^(.*)'$), WrappedRegex(^\+$)], allow_concatenation: true, allow_dashes: true, allow_emojis: true }, tokenization_splitchars: "\",;:.!?#(){}[]|/_-‒\'`&@§¶…" }), nlprules: Some(NlpRulesConfig { override_rules: None, override_tokenizer: None }), reflow: None } from Some("/media/supersonic1t/projects/parity/polkadot/.config/spellcheck.toml")
[2021-05-27T07:20:32Z DEBUG cargo_spellcheck::traverse] Running on inputs ["/media/supersonic1t/projects/parity/polkadot/node/overseer/overseer-gen/proc-macro/"] / recursive=false
[2021-05-27T07:20:32Z DEBUG cargo_spellcheck::traverse] Processing /media/supersonic1t/projects/parity/polkadot/node/overseer/overseer-gen/proc-macro/ -> /media/supersonic1t/projects/parity/polkadot/node/overseer/overseer-gen/proc-macro/
[2021-05-27T07:20:32Z DEBUG cargo_spellcheck::traverse] Running on absolute dirs ["/media/supersonic1t/projects/parity/polkadot/node/overseer/overseer-gen/proc-macro"]
[2021-05-27T07:20:32Z DEBUG cargo_spellcheck::traverse] Found a total of 1 files to check
[2021-05-27T07:20:32Z TRACE cargo_spellcheck::traverse] 📜 Handle manifest in dir: /media/supersonic1t/projects/parity/polkadot/node/overseer/overseer-gen/proc-macro
[2021-05-27T07:20:32Z TRACE cargo_spellcheck::traverse] 📜 manifest products {}
[2021-05-27T07:20:32Z WARN cargo_spellcheck::traverse] Did not impl handling of ManifestDescription("Generate an overseer including builder pattern and message wrapper from a single annotated struct definition.") type files
[2021-05-27T07:20:32Z DEBUG cargo_spellcheck::checker] Running NlpRules checks.
[2021-05-27T07:20:32Z INFO cargo_spellcheck::checker::tokenize] 🧮 Loading tokenizer...
[2021-05-27T07:20:32Z INFO cargo_spellcheck::checker::tokenize] 🧮 Loaded tokenizer.
[2021-05-27T07:20:32Z INFO cargo_spellcheck::checker::tokenize] 🧮 Loading rules...
[2021-05-27T07:20:32Z INFO cargo_spellcheck::checker::tokenize] 🧮 Loaded rules.
[2021-05-27T07:20:32Z DEBUG cargo_spellcheck::checker] Running Hunspell checks.
[2021-05-27T07:20:32Z DEBUG cargo_spellcheck::checker::hunspell] Found dictionary search path /media/supersonic1t/projects/parity/polkadot/.config
[2021-05-27T07:20:32Z DEBUG cargo_spellcheck::checker::hunspell] Dictionary path dervied from search dir is not a file /media/supersonic1t/projects/parity/polkadot/.config/en_US.dic
[2021-05-27T07:20:32Z DEBUG cargo_spellcheck::checker::hunspell] Found dictionary search path /usr/share/myspell
[2021-05-27T07:20:32Z DEBUG cargo_spellcheck::checker::hunspell] Using dic /usr/share/myspell/en_US.dic and aff /usr/share/myspell/en_US.aff
[2021-05-27T07:20:32Z DEBUG cargo_spellcheck::checker::hunspell] Adding extra dictionary /media/supersonic1t/projects/parity/polkadot/.config/lingua.dic
[2021-05-27T07:20:32Z DEBUG cargo_spellcheck::checker::hunspell] Dictionary setup completed successfully.
[2021-05-27T07:20:32Z TRACE cargo_spellcheck::action::interactive] Select the ones to actully use
[2021-05-27T07:20:32Z DEBUG cargo_spellcheck::action] No band aids to apply