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

build(deps): bump github.com/golangci/misspell 0.4.0 to 0.4.1 #3918

Merged
merged 3 commits into from Jun 19, 2023

Conversation

ldez
Copy link
Member

@ldez ldez commented Jun 18, 2023

misspell: convert ignore-words to lowercase

golangci/misspell@v0.4.0...v0.4.1

Fixes #3406

@ldez ldez added enhancement New feature or improvement linter: update Update the linter implementation inside golangci-lint labels Jun 18, 2023
Copy link
Member

@bombsimon bombsimon left a comment

Choose a reason for hiding this comment

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

The docs (upstream and our fork) states that this is case sensitive. Should we update the docs in our fork? If not, this sounds like the expected behaviour to me.

@ldez
Copy link
Member Author

ldez commented Jun 18, 2023

In fact, the ignore-words option is not related to this section but to this section.

ignore-words uses Replacer.RemoveRule(), that remove rule by key.
Replacer.RemoveRule() uses inArray(), that check the equality.

The goal of ignore-words (the name is bad/wrong) is just to remove/filter a prefined rule, so you need to know the key of this rule. It's just a filter based on keys, not "words".

@ldez ldez force-pushed the fix/misspell-ignoreWords branch from 679bcb0 to e51b9ea Compare June 18, 2023 19:43
@ldez
Copy link
Member Author

ldez commented Jun 18, 2023

Note: another fix can be to use strings.EqualFold instead of == inside the inArray() function.

WDYT?

Copy link
Member

@bombsimon bombsimon left a comment

Choose a reason for hiding this comment

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

Oh, read the wrong section!

I think equal folds is clearer and shows that any casing matches but this works fine as well!

@ldez ldez changed the title misspell: convert ignore-words to lowercase build(deps): bump github.com/golangci/misspell 0.4.0 to 0.4.1 Jun 19, 2023
@ldez ldez added linter: update version Update version of linter dependencies Relates to an upstream dependency go Pull requests that update Go code and removed linter: update Update the linter implementation inside golangci-lint enhancement New feature or improvement labels Jun 19, 2023
@ldez ldez merged commit cecd497 into golangci:master Jun 19, 2023
16 checks passed
@ldez ldez deleted the fix/misspell-ignoreWords branch June 19, 2023 00:30
@ldez ldez added this to the v1.54 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Relates to an upstream dependency go Pull requests that update Go code linter: update version Update version of linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

misspell ignore-words doesn't seem to be working
2 participants