Skip to content

Commit 07d3fc4

Browse files
committed
ci: update golangci-lint
1 parent 6baed78 commit 07d3fc4

File tree

2 files changed

+66
-83
lines changed

2 files changed

+66
-83
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ jobs:
2020
- uses: actions/setup-go@v5
2121
with:
2222
go-version: '1.24.0'
23-
cache: false
23+
cache: true
2424
- name: golangci-lint
25-
uses: golangci/golangci-lint-action@v3
25+
uses: golangci/golangci-lint-action@v8
2626
with:
2727
# Require: The version of golangci-lint to use.
2828
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
2929
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
30-
version: v1.64.8
30+
version: v2.6.2
3131

3232
# Optional: working directory, useful for monorepos
3333
# working-directory: somedir

.golangci.yml

Lines changed: 63 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
linters-settings:
2-
gofmt:
3-
simplify: true
4-
goimports:
5-
local-prefixes: github.com/Vonage/vonage-cloud-runtime-cli
6-
gocyclo:
7-
min-complexity: 20
8-
cyclop:
9-
max-complexity: 20
1+
version: 2
102

113
run:
124
timeout: 10m
@@ -18,75 +10,66 @@ run:
1810
- node_modules
1911

2012
linters:
21-
enable-all: true
22-
disable:
23-
- gochecknoglobals
24-
- gochecknoinits
25-
- funlen
26-
- wsl
27-
- lll
28-
- exhaustivestruct
29-
- wrapcheck
30-
- exhaustruct
31-
- forbidigo
32-
- godot
33-
- gofumpt
34-
- depguard
35-
- goerr113
36-
- ifshort
37-
- interfacebloat
38-
- ireturn
39-
- paralleltest
40-
- testpackage
41-
- varnamelen
42-
- tagliatelle
43-
- nlreturn
44-
- noctx
45-
- gomnd
46-
- forcetypeassert
47-
- whitespace
48-
- gci
49-
- scopelint
50-
- godox
51-
- gosec
52-
- nestif
53-
- mirror
54-
- thelper
55-
- usestdlibvars
56-
- nosnakecase
57-
- contextcheck
58-
- maligned
59-
- unconvert
60-
- durationcheck
61-
- usestdlibvars
62-
- thelper
63-
- predeclared
64-
- maintidx
65-
- unparam
66-
- perfsprint
67-
- gosmopolitan
13+
enable:
14+
- errcheck
15+
- govet
16+
- staticcheck
17+
- unused
18+
- ineffassign
19+
- misspell
20+
- goconst
21+
- gocyclo
22+
- cyclop
23+
- errname
24+
- errorlint
25+
- gocritic
26+
- goprintffuncname
27+
- nilerr
28+
- rowserrcheck
29+
- sqlclosecheck
30+
settings:
31+
gocyclo:
32+
min-complexity: 25
33+
cyclop:
34+
max-complexity: 25
35+
skip-tests: true
36+
37+
exclusions:
38+
rules:
39+
- text: "Error return value of `.*Close` is not checked"
40+
linters:
41+
- errcheck
42+
- text: "Error return value of `fmt.Fprint` is not checked"
43+
linters:
44+
- errcheck
45+
- text: "Error return value of `fmt.Fprintf` is not checked"
46+
linters:
47+
- errcheck
48+
- text: "Error return value of `fmt.Fprintln` is not checked"
49+
linters:
50+
- errcheck
51+
- text: "don't use an underscore in package name"
52+
linters:
53+
- golint
54+
- text: "package comment should be of the form"
55+
linters:
56+
- golint
57+
- path: _test\.go
58+
linters:
59+
- funlen
60+
- goconst
61+
- dupl
62+
- gocognit
63+
- testifylint
64+
- cyclop
65+
- gocyclo
66+
- errcheck
67+
- path: tests/integration
68+
linters:
69+
- funlen
70+
- goconst
71+
- dupl
72+
- cyclop
73+
- gocyclo
74+
6875

69-
issues:
70-
exclude-rules:
71-
- text: "don't use an underscore in package name"
72-
linters:
73-
- golint
74-
- text: "package comment should be of the form"
75-
linters:
76-
- golint
77-
- path: (.+)_test.go
78-
linters:
79-
- funlen
80-
- goconst
81-
- dupl
82-
- exhaustivestruct
83-
- gocognit
84-
- structcheck
85-
- testifylint
86-
- path: tests/integration
87-
linters:
88-
- funlen
89-
- goconst
90-
- dupl
91-
- exhaustivestruct
92-
- structcheck

0 commit comments

Comments
 (0)