Skip to content

Commit

Permalink
Update to golangci-lint v1.39.x (#57)
Browse files Browse the repository at this point in the history
The currently latest `golangci-lint` version 1.39.0 [1] introduced new
linters and updated supported ones:

1. predeclared [2] (v1.35.0 [3]) - Checks for definitions and
   declarations that shadows one of Go's pre-declared identifiers [4].
   This linter is disabled by default, but is enabled for this template
   to help to prevent shadowed identifiers.
2. interfacer [5] (v1.38.0 [6]) - Has been deprecated [7] and removed
   from this template.
3. scopelint [8] (v1.39.0 [9]) - Has been deprecated [10] and replaced
   by exportloopref [11].
   The `exportloopref` linter is disabled by default, but is enabled for
   this template to help to catch loop variable bugs.

[1]: https://github.com/golangci/golangci-lint/releases/tag/v1.39.0
[2]: https://github.com/nishanths/predeclared
[3]: https://github.com/golangci/golangci-lint/releases/tag/v1.35.0
[4]: https://golang.org/ref/spec#Predeclared_identifiers
[5]: https://github.com/mvdan/interfacer
[6]: https://github.com/golangci/golangci-lint/releases/tag/v1.38.0
[7]: golangci/golangci-lint#1755
[8]: https://github.com/kyoh86/scopelint
[9]: https://github.com/golangci/golangci-lint/releases/tag/v1.39.0
[10]: golangci/golangci-lint#1819
[11]: https://github.com/kyoh86/exportloopref

Closes GH-56
  • Loading branch information
svengreb authored Apr 26, 2021
1 parent 322ad30 commit 3e60efb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
# See https://github.com/golangci/golangci-lint-action for more details.
uses: golangci/[email protected]
with:
version: v1.32
version: v1.39
test:
strategy:
matrix:
Expand Down
5 changes: 2 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ linters:
- dupl
- errcheck
- exhaustive
- exportloopref
- gochecknoinits
- goconst
- gocritic
Expand All @@ -49,13 +50,11 @@ linters:
- gosimple
- govet
- ineffassign
- interfacer
- lll
- misspell
- nakedret
- noctx
- nolintlint
- scopelint
- staticcheck
- structcheck
- stylecheck
Expand Down Expand Up @@ -147,4 +146,4 @@ run:
deadline: 15m

service:
golangci-lint-version: 1.32.x
golangci-lint-version: 1.39.x

0 comments on commit 3e60efb

Please sign in to comment.