Skip to content

Commit 60ae85a

Browse files
Update linter to v1.64.8 (#304)
1 parent 9b9cca2 commit 60ae85a

File tree

3 files changed

+4
-26
lines changed

3 files changed

+4
-26
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
uses: golangci/golangci-lint-action@v3
4444
with:
4545
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
46-
version: v1.55.2
46+
version: v1.64.8
4747

4848
# Give the job more time to execute.
4949
# Regarding `--whole-files`, the linter is supposed to support linting of changed a patch only but,

.golangci.yml

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
run:
33
# timeout for analysis, e.g. 30s, 5m, default is 1m
44
timeout: 1m
5+
go: "1.24.1"
56

67
issues:
78
# Maximum count of issues with the same text.
@@ -24,22 +25,16 @@ linters:
2425
- errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.
2526
- forbidigo # forbids identifiers matched by reg exps
2627
- gomoddirectives # manage the use of 'replace', 'retract', and 'excludes' directives in go.mod.
27-
- gosimple # linter for Go source code that specializes in simplifying a code
2828
- misspell # finds commonly misspelled English words in comments
2929
- nakedret # finds naked returns in functions greater than a specified function length
3030
- nolintlint # reports ill-formed or insufficient nolint directives
31-
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
32-
- stylecheck # a replacement for golint
3331
- unused # checks Go code for unused constants, variables, functions and types
3432
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
3533
- ineffassign # detects when assignments to existing variables are not used
36-
- structcheck # finds unused struct fields
3734
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
38-
- varcheck # Finds unused global variables and constants
3935
- asciicheck # simple linter to check that your code does not contain non-ASCII identifiers
4036
- bodyclose # checks whether HTTP response body is closed successfully
4137
- durationcheck # check for two durations multiplied together
42-
- exportloopref # checks for pointers to enclosing loop variables
4338
- goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
4439
- gosec # inspects source code for security problems
4540
- importas # enforces consistent import aliases
@@ -49,6 +44,7 @@ linters:
4944
- wastedassign # wastedassign finds wasted assignment statements.
5045
- gomodguard # check for blocked dependencies in go.mod
5146
- depguard # check for blocked dependencies in Go files
47+
- copyloopvar
5248

5349
# all available settings of specific linters
5450
linters-settings:
@@ -82,10 +78,6 @@ linters-settings:
8278
# Allow local `replace` directives. Default is false.
8379
replace-local: false
8480

85-
gosimple:
86-
# Select the Go version to target. The default is '1.13'.
87-
go: "1.22.12"
88-
8981
nakedret:
9082
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30
9183
max-func-lines: 0
@@ -124,21 +116,7 @@ linters-settings:
124116
- pkg: "math/rand$"
125117
desc: "superseded by math/rand/v2"
126118

127-
staticcheck:
128-
# Select the Go version to target. The default is '1.13'.
129-
go: "1.22.12"
130-
# https://staticcheck.io/docs/options#checks
131-
checks: ["all"]
132-
133-
stylecheck:
134-
# Select the Go version to target. The default is '1.13'.
135-
go: "1.22.12"
136-
# https://staticcheck.io/docs/options#checks
137-
checks: ["all"]
138-
139119
unused:
140-
# Select the Go version to target. The default is '1.13'.
141-
go: "1.22.12"
142120

143121
gosec:
144122
excludes:

dev-tools/mage/linter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
)
3232

3333
const (
34-
linterVersion = "v1.55.2"
34+
linterVersion = "v1.64.8"
3535
linterInstallURL = "https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh"
3636
)
3737

0 commit comments

Comments
 (0)