Details
-
Bug
-
Resolution: Fixed
-
Major
-
master
-
None
-
Untriaged
-
0
-
Unknown
Description
What's the issue?
We have run into a false positive golangci error where it claims that a nolint directive is not used when in reality it is:
+ golangci-lint run --config ../.golangci.yml --timeout=10m
|
tls/config_test.go:116:50: directive `//nolint:staticcheck` is unused for linter "staticcheck" (nolintlint) |
require.Len(t, config.ClientCAs.Subjects(), 1) //nolint:staticcheck |
^
|
tls/config_test.go:147:68: directive `//nolint:staticcheck` is unused for linter "staticcheck" (nolintlint) |
require.Len(t, config.RootCAs.Subjects(), len(pool.Subjects())+1) //nolint:staticcheck |
We have found an issue raised about this on github: https://github.com/golangci/golangci-lint/issues/3228
What's the fix?
Clean the cache as per the issue comments which claim that should fix the issue. Also as part of this we will also upgrade the golangci version to the latest one.
Attachments
For Gerrit Dashboard: MB-61692 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
209200,3 | MB-61692 Upgrade golangci and clean cache | master | tools-common | Status: MERGED | +2 | +1 |
209235,3 | MB-61692 Fix lint errors | master | tools-common | Status: MERGED | +2 | +1 |