Closed silverwind closed 6 months ago
You are joining me somehow with the ticket I opened #15
Is it ok to edit?
word.go
is generated, so this should not be edited.
Inside golangci-lint, you should use extra-words
.
I wanted to contribute the new words to the project so all users can benefit. If you check the history of words.go
, it was edited multiple times in the past:
https://github.com/golangci/misspell/commits/master/words.go
PS: extra-words
does not work for our use case because we run misspell
standalone and lint various non-go files as well, so it would have to be made an option to misspell
itself.
PS:
extra-words
does not work for our use case because we runmisspell
standalone and lint various non-go files as well, so it would have to be made an option tomisspell
itself.
if you are using misspell as a standalone thing, so maybe outside a Go tool, I would like you to look at the following projects:
And if you have a need to code something in golang, you can use misspell.Replacer.AddRules
I had a look at some of these projects, but my experience so far is that they are too aggressive and often require an extensive configuration which would be a nightmare to maintain.
I do like misspell because it does produce reasonably good results without any configuration.
Yes, I will consider running misspell in go
, but would prefer if there were a CLI flag to supply extra words.
If you check the history of words.go, it was edited multiple times in the past:
Yes, but the commits that are not by the original author were backported of PRs from the original repo and IMO this was an error. This file should not be modified by hand.
we run misspell standalone
I will think about a CLI flag to define a path to a list of external words.
I had a look at some of these projects, but my experience so far is that they are too aggressive and often require an extensive configuration which would be a nightmare to maintain.
I do like misspell because it does produce reasonably good results without any configuration.
I agree with you about cspell and vale. But you should take a look at typos
it works very well, same for codespell.
I had a look at some of these projects, but my experience so far is that they are too aggressive and often require an extensive configuration which would be a nightmare to maintain. I do like misspell because it does produce reasonably good results without any configuration.
I agree with you about cspell and vale. But you should take a look at
typos
it works very well, same for codespell.
Thanks, will check out typos
.
The last time I tried codespell required a ton of configuration, even with it's clear
dictionary. For example, it flagged var names like crossReference
to be renamed to cross-reference
which would be an invalid identifier in golang. So I do not consider it currently.
I added a new option -dict
: the option takes a path to a CSV file.
$ misspell -dict config.example.csv ./temp
temp/temp.go:4:4: "acounts" is a misspelling of "accounts"
temp/temp.go:5:4: "canidate" is a misspelling of "candidate"
temp/temp.go:6:4: "comfirm" is a misspelling of "confirm"
temp/temp.go:7:4: "commiter" is a misspelling of "committer"
temp/temp.go:8:4: "converage" is a misspelling of "coverage"
temp/temp.go:9:4: "currrently" is a misspelling of "currently"
temp/temp.go:10:4: "delimeter" is a misspelling of "delimiter"
temp/temp.go:11:4: "differrent" is a misspelling of "different"
temp/temp.go:12:4: "exclusing" is a misspelling of "excluding"
temp/temp.go:13:4: "finshed" is a misspelling of "finished"
temp/temp.go:14:4: "formated" is a misspelling of "formatted"
temp/temp.go:15:4: "inderect" is a misspelling of "indirect"
temp/temp.go:16:4: "insuficient" is a misspelling of "insufficient"
temp/temp.go:17:4: "likly" is a misspelling of "likely"
temp/temp.go:18:4: "mergable" is a misspelling of "mergeable"
temp/temp.go:19:4: "overrided" is a misspelling of "overridden"
temp/temp.go:20:4: "priortized" is a misspelling of "prioritized"
temp/temp.go:21:4: "registeration" is a misspelling of "registration"
temp/temp.go:22:4: "reuqest" is a misspelling of "request"
temp/temp.go:23:4: "reviwer" is a misspelling of "reviewer"
temp/temp.go:24:4: "superceded" is a misspelling of "superseded"
temp/temp.go:25:4: "underlaying" is a misspelling of "underlying"
Awesome, thanks!
Great ! thanks @ldez
I'd like to add new words, but words.go has a
DO NOT EDIT
comment, while it actually seems to have been edited in the past. Is it ok to edit?I would like to add these words found in the gitea codebase, hopefully all unambiguous: