Skip to content

Conversation

dkegel-fastly
Copy link

@dkegel-fastly dkegel-fastly commented Aug 6, 2024

Used the little script

awk '{printf "%s %s\n", length($1), $0;}' | sort -k1rn,1 -k2 | sed 's/^[0-9]* //'

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.

Used the little script
   awk '{printf "%s %s\n", length($1), $0;}' | sort -k1rn,1 -k2 | sed 's/^[0-9]* //'
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.
@@ -20565,9 +20574,11 @@ var DictMain = []string{
"aldutery", "adultery",
"aleniate", "alienate",
"algoritm", "algorithm",
"aligment", "allignment",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alignment; only a single l in the correct spelling.

@ldez ldez added the invalid This doesn't seem right label Aug 6, 2024
@ldez
Copy link
Member

ldez commented Aug 6, 2024

// Code generated automatically. DO NOT EDIT.

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

@ldez ldez closed this Aug 6, 2024
@dkegel-fastly
Copy link
Author

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: client9@67d98e0

@ldez
Copy link
Member

ldez commented Aug 6, 2024

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.

@dkegel-fastly
Copy link
Author

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.

@ldez ldez mentioned this pull request May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants