Closed dkegel-fastly closed 3 months ago
https://github.com/golangci/misspell/blob/7082d007c4a8a395ea7d9c9a427b93be43bec2a3/words.go#L3
The list of words cannot be changed by hand.
You must use -dict
to add your words for your project:
-dict string
User defined corrections file path (.csv). CSV format: typo,fix
https://github.com/golangci/misspell?tab=readme-ov-file#usage
Happy to use a project-specific dictionary for tinygo.
That said, on the theory that this project might want to expand words.go sometime, is there a way currently to regenerate it?
Looking around the source tree, the original generator seems to have been removed in 2016: https://github.com/client9/misspell/commit/67d98e00e46e0a57742b26951ab41cba671071d5
The generator has been moved out of misspell itself, it has not been removed.
https://github.com/golangci/misspell-source-data
The words file has not been updated recently but it's quite complex to generate it (some APIs are now not free, others have evolved, etc).
Misspell is neither a complete spell-checking program nor a grammar checker. It is a tool to correct commonly misspelled English words. The list of words contains only common mistakes, they don't evolve too much over time.
Thanks!
Now that you have a nice project-specific dictionaries feature, it's less important to improve the coverage of the main dictionary.
Someday it might be interesting to consider adding a source to https://github.com/golangci/misspell-source-data/tree/master/sources to harvest project-specific dictionaries from github projects that use misspell. Maybe after that feature is more widely known and used.
Used the little script
to sort
DictMain
after adding the entries for those words, then moved "coca cola" back into place manually, verified that resulted in no extra changes.