Skip to content

Commit 3e60efb

Browse files
authored
Update to golangci-lint v1.39.x (#57)
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
1 parent 322ad30 commit 3e60efb

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
# See https://github.com/golangci/golangci-lint-action for more details.
5252
uses: golangci/golangci-lint-action@v2.5.2
5353
with:
54-
version: v1.32
54+
version: v1.39
5555
test:
5656
strategy:
5757
matrix:

.golangci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ linters:
3333
- dupl
3434
- errcheck
3535
- exhaustive
36+
- exportloopref
3637
- gochecknoinits
3738
- goconst
3839
- gocritic
@@ -49,13 +50,11 @@ linters:
4950
- gosimple
5051
- govet
5152
- ineffassign
52-
- interfacer
5353
- lll
5454
- misspell
5555
- nakedret
5656
- noctx
5757
- nolintlint
58-
- scopelint
5958
- staticcheck
6059
- structcheck
6160
- stylecheck
@@ -147,4 +146,4 @@ run:
147146
deadline: 15m
148147

149148
service:
150-
golangci-lint-version: 1.32.x
149+
golangci-lint-version: 1.39.x

0 commit comments

Comments
 (0)