Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support a .spellignore file #23

Open
silverwind opened this issue Aug 9, 2024 · 1 comment
Open

Support a .spellignore file #23

silverwind opened this issue Aug 9, 2024 · 1 comment
Labels

Comments

@silverwind
Copy link

silverwind commented Aug 9, 2024

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/[email protected]"

if [ -e .spellignore ]; then
  go run "$MISSPELL_PACKAGE" -i "$(xargs echo -n < .spellignore | tr ' ' ',')" "$@"
else
  go run "$MISSPELL_PACKAGE" "$@"
fi
@ldez ldez added the proposal label Aug 9, 2024
@ldez
Copy link
Member

ldez commented Aug 10, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants