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

misspell ignore-words doesn't seem to be working #3406

Closed
4 tasks done
ghost opened this issue Dec 7, 2022 · 4 comments · Fixed by #3918
Closed
4 tasks done

misspell ignore-words doesn't seem to be working #3406

ghost opened this issue Dec 7, 2022 · 4 comments · Fixed by #3918
Labels
enhancement New feature or improvement

Comments

@ghost
Copy link

ghost commented Dec 7, 2022

Welcome

  • Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, config, etc.).
  • Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.). (https://golangci-lint.run/usage/linters/)

Description of the problem

I've tried using this:

  misspell:
    locale: US
    ignore-words:
      - Dialogue

and if I have the following in my golang code:

type Test struct {
	Dialogue string
}

Dialogue is replaced wth Dialog

Version of golangci-lint

$ golangci-lint --version
golangci-lint has version v1.46.2 built from (unknown, mod sum: "h1:o90t/Xa6dhJbvy8Bz2RpzUXqrkigp19DLStMolTZbyo=") on (unknown)

Configuration file

$ cat .golangci.yml
linters-settings:
  misspell:
    locale: US
    ignore-words:
      - Dialogue

Go environment

$ go version && go env
go version go1.19.2 linux/arm64
GO111MODULE=""
GOARCH="arm64"
GOBIN="/go/bin"
GOCACHE="/home/vscode/.cache/go-build"
GOENV="/home/vscode/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_arm64"
GOVCS=""
GOVERSION="go1.19.2"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/workspaces/my-project/go.mod"
GOWORK="/workspaces/my-project/go.work"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3362665096=/tmp/go-build -gno-record-gcc-switches"

Verbose output of running

$ golangci-lint cache clean
$ golangci-lint run -v
`Dialogue` is a misspelling of `Dialog` (misspell)
        // Dialogue

Code example or link to a public repository

type Test struct {
	Dialogue string
}

Dialogue gets replaced with Dialog

@ghost ghost added the bug Something isn't working label Dec 7, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Dec 7, 2022

Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.

@ldez ldez added question Further information is requested and removed bug Something isn't working labels Dec 8, 2022
@ldez
Copy link
Member

ldez commented Jun 17, 2023

Hello,

it's because ignore-words values must be in lowercase.

linters-settings:
  misspell:
    locale: US
    ignore-words:
      - dialogue

@ldez ldez added enhancement New feature or improvement and removed question Further information is requested labels Jun 18, 2023
@ghost
Copy link
Author

ghost commented Jun 18, 2023

ah - thanks!

@ghost ghost closed this as completed Jun 18, 2023
@ldez
Copy link
Member

ldez commented Jun 18, 2023

I created a PR to put all the ignore-words to lowercase 😉 #3918

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant