-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: add linter dupword #3192
feat: add linter dupword #3192
Conversation
Hey, thank you for opening your first Pull Request ! |
In order for a pull request adding a linter to be reviewed, the linter and the PR must follow some requirements. Pull Request Description
Linter
The Linter Tests Inside Golangci-lint
|
766c936
to
5f284f2
Compare
Hello, your linter seems weird: I expected an automatic detection of duplicate words and not a list of words. |
There are two reasons: First, the repetitive 'the' 'a' 'and' is not grammatically valid, and there is no false positive problem. Second, I find that repeating these words is more common. I prefer this tool to use the update 09/10: I have release dupword v0.0.6 to support detection arbitrary duplicate words and make it default, but add my advice in README.md. And For an example of detecting arbitrary duplicate words in istio's latest code, see Abirdcfly/dupword#4 As far as I can see, detecting arbitrary duplicate words instead of specifying a list does detect a lot of unexpected errors (see Abirdcfly/dupword#4, like |
I guess this is also useful for people who for whatever reason write their comments in other languages than english. |
5f284f2
to
876adab
Compare
Your linter seems to not work as expected: the tests are failing (and it's not related to my changes). |
Sorry for the error, Have updated the code. Locally Test passed via |
Windows test fail, I guess it is flake? |
Yes it's flaky, it will fix by my PR #3204 |
Signed-off-by: Abirdcfly <[email protected]>
Signed-off-by: Abirdcfly <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
dupword is a linter that checks for duplicate words in the source code (usually miswritten)
Examples in real code and related issues can be viewed in Abirdcfly/dupword#3
https://github.com/Abirdcfly/dupword