golangci / misspell

Correct commonly misspelled English words in source files
MIT License
22 stars 11 forks source link

Support a `.spellignore` file #23

Open silverwind opened 3 months ago

silverwind commented 3 months ago

Misspell currently supports a -i argument but I find it more flexible to have ignored words listed in a file. In the spirit of .gitignore and other similar files, I propose supporting a .spellignore file. Currently I have implemented this in a bash script:

#!/bin/bash
MISSPELL_PACKAGE="github.com/golangci/misspell/cmd/misspell@v0.6.0"

if [ -e .spellignore ]; then
  go run "$MISSPELL_PACKAGE" -i "$(xargs echo -n < .spellignore | tr ' ' ',')" "$@"
else
  go run "$MISSPELL_PACKAGE" "$@"
fi
ldez commented 3 months ago

I can see 2 problems:

Your issue is more a proposal of a solution than a description of a problem. Even if I understand the needs, the proposed solution is not something I want to implement.

I can see 2 other approaches: