tbroadley / spellchecker-cli

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

Add CLI option to ignore gitignore #57

Closed declanvk closed 4 years ago

declanvk commented 4 years ago

Description

Add new CLI option as a boolean flag that will disable using the .gitignore file to filter out files from spellchecking

Motivation

I'm interested in using spellchecker-cli on artifacts produced by my build process, however the hardcoded { gitignore: true } prevents that.

Testing

Manual testing in the spellchecker-cli repo, I ran:

node index.js -- --no-gitignore -f node_modules/xtend/LICENCE

Related

tbroadley commented 4 years ago

Thank you for the PR! It looks good. I have a couple of requests if you don't mind.

I'm wondering if it's possible to write a test for this flag. Maybe by adding a .gitignore to test/fixtures, then writing a test that creates a gitignored file in that directory and runs node index.js on it. test/cli-test.js contains some similar tests.

Also, I just created a pull request template. Would you mind following the last three steps in that file?

declanvk commented 4 years ago

I added the documentation to the CHANGELOG and README, plus the tests that include a gitignore'd file. Let me know if there is anything else I can include.

tbroadley commented 4 years ago

Thanks for making those changes! I'll release a new version right away.