tbroadley / spellchecker-cli

A command-line tool for spellchecking files.
MIT License
119 stars 16 forks source link

Quiet flag isn't quiet #68

Closed kf6kjg closed 3 years ago

kf6kjg commented 3 years ago
$ spellchecker -qf 'somefile'

Spellchecking 1 files...

Is not my definition of quiet. I submit that the tool should not print anything, including the whitespace, if -q is specified and the file has no mispelins.

Whether or not it prints all the extra lines and status if there ARE misspellings isn't so much of a concern for me.

Here's my use case:

nodemon --watch . --ext md --exec "find -iname '*.md' -and -not -path '*/node_modules/*' | parallel spellchecker --no-gitignore -qd .vscode/spellright.dict -f '{}'"

Which prints out a TON of lines that say "Spellchecking 1 files...` with lots of whitespace.

Why am I using parallel instead of globbing? It's lots, lots faster.

tbroadley commented 3 years ago

Thanks for the issue! Yeah that definitely seems like a bug. Good catch.

Those performance numbers are interesting too. If you're running the command on a public project, you could link it here - at some point I might take a look at why globbing is so much slower than xargs.