Support a `.spellignore` file
silverwind opened this issue · 1 comments
silverwind commented
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
I can see 2 problems:
.spellignore
name implies a kind of proximity with.gitignore
syntax, and it's not something interesting in the context of misspell.- as the list of words contains common mistakes, the ignore list should be very small unless you want to keep mistakes.
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:
- create a configuration file with all the options of misspell
- use the same approach as
-dict
by adding an option to load a file.