Skip to content

Commit d84f103

Browse files
authored
all: upgrade to golangci-lint v1.55.2 (#416)
Upgrade `golangci-lint` to address a bug triggered since Go 1.21.5. See: golangci/golangci-lint#3718 See: golang/go#64592
1 parent 3a05880 commit d84f103

File tree

2 files changed

+49
-5
lines changed

2 files changed

+49
-5
lines changed

.golangci.yml

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ linters:
1414
- funlen
1515
- gochecknoglobals
1616
- gochecknoinits
17+
- goconst
1718
- godox
1819
- goerr113
1920
- golint
2021
- gomnd
2122
- gosec
2223
- ifshort
24+
- inamedparam
2325
- interfacer
2426
- ireturn
2527
- lll
@@ -29,6 +31,7 @@ linters:
2931
- nosnakecase
3032
- paralleltest
3133
- prealloc
34+
- perfsprint
3235
- rowserrcheck
3336
- scopelint
3437
- structcheck
@@ -42,15 +45,56 @@ linters:
4245
- wsl
4346
linters-settings:
4447
depguard:
45-
list-type: whitelist
46-
packages:
47-
- github.com/mmcloughlin/avo
48-
- golang.org/x/
48+
rules:
49+
main:
50+
allow:
51+
- github.com/mmcloughlin/avo
52+
- golang.org/x/
53+
- $gostd
4954
gci:
5055
sections:
5156
- standard
5257
- default
5358
- prefix(github.com/mmcloughlin/avo)
59+
revive:
60+
enable-all-rules: true
61+
rules:
62+
- name: add-constant
63+
disabled: true
64+
- name: confusing-results
65+
disabled: true
66+
- name: cognitive-complexity
67+
disabled: true
68+
- name: cyclomatic
69+
disabled: true
70+
- name: deep-exit
71+
disabled: true
72+
- name: empty-block
73+
disabled: true
74+
- name: flag-parameter
75+
disabled: true
76+
- name: function-length
77+
disabled: true
78+
- name: if-return
79+
disabled: true
80+
- name: line-length-limit
81+
disabled: true
82+
- name: max-public-structs
83+
disabled: true
84+
- name: modifies-value-receiver
85+
disabled: true
86+
- name: unexported-naming
87+
disabled: true
88+
- name: unhandled-error
89+
arguments:
90+
- 'fmt\.(P|Fp)rint(ln|f)?'
91+
- 'text/tabwriter\.Writer\.Flush'
92+
- name: unused-parameter
93+
disabled: true
94+
- name: unused-receiver
95+
disabled: true
96+
- name: use-any
97+
disabled: true
5498
issues:
5599
exclude-use-default: false
56100
exclude:

script/bootstrap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
go install ./internal/cmd/asmvet
55

66
# golangci-lint for linting
7-
golangci_lint_version='v1.51.2'
7+
golangci_lint_version='v1.55.2'
88
golangci_install_script="https://raw.githubusercontent.com/golangci/golangci-lint/${golangci_lint_version}/install.sh"
99
curl -sfL "${golangci_install_script}" | sh -s -- -b "$(go env GOPATH)/bin" "${golangci_lint_version}"
1010

0 commit comments

Comments
 (0)