Skip to content

Commit e58ab2c

Browse files
authored
fix ci: update tools (#46)
1 parent 7453ce7 commit e58ab2c

File tree

2 files changed

+89
-3
lines changed

2 files changed

+89
-3
lines changed

.github/workflows/checks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ jobs:
3737
uses: actions/checkout@v2
3838

3939
- name: Install gofumpt
40-
run: go install mvdan.cc/gofumpt@v0.4.0
40+
run: go install mvdan.cc/gofumpt@v0.6.0
4141

4242
- name: Install staticcheck
43-
run: go install honnef.co/go/tools/cmd/staticcheck@2024.1.1
43+
run: go install honnef.co/go/tools/cmd/staticcheck@2025.1.1
4444

4545
- name: Install golangci-lint
46-
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0
46+
run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.2
4747

4848
- name: Lint
4949
run: make lint

.golangci.yaml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
version: "2"
2+
linters:
3+
enable-all: true
4+
disable:
5+
- cyclop
6+
- forbidigo
7+
- funlen
8+
- gochecknoglobals
9+
- gochecknoinits
10+
- gocritic
11+
- godot
12+
- godox
13+
- mnd
14+
- lll
15+
- nestif
16+
- nilnil
17+
- nlreturn
18+
- noctx
19+
- nonamedreturns
20+
- paralleltest
21+
- revive
22+
- testpackage
23+
- unparam
24+
- varnamelen
25+
- wrapcheck
26+
- wsl
27+
- exhaustruct
28+
- depguard
29+
- err113
30+
31+
#
32+
# Disabled because of generics:
33+
#
34+
- contextcheck
35+
- rowserrcheck
36+
- sqlclosecheck
37+
- wastedassign
38+
39+
#
40+
# Disabled because deprecated:
41+
#
42+
43+
linters-settings:
44+
#
45+
# The G108 rule throws a false positive. We're not actually vulnerable. If
46+
# you're not careful the profiling endpoint is automatically exposed on
47+
# /debug/pprof if you import net/http/pprof. See this link:
48+
#
49+
# https://mmcloughlin.com/posts/your-pprof-is-showing
50+
#
51+
gosec:
52+
excludes:
53+
- G108
54+
55+
tagliatelle:
56+
case:
57+
rules:
58+
json: snake
59+
60+
gofumpt:
61+
extra-rules: true
62+
63+
exhaustruct:
64+
exclude:
65+
#
66+
# Structures outside our control that have a ton of settings. It doesn't
67+
# make sense to specify all of the fields.
68+
#
69+
- 'cobra.Command'
70+
- 'logrus.*Formatter'
71+
72+
formatters:
73+
enable:
74+
- gci
75+
- gofmt
76+
- gofumpt
77+
- goimports
78+
settings:
79+
gofumpt:
80+
extra-rules: true
81+
exclusions:
82+
generated: lax
83+
paths:
84+
- third_party$
85+
- builtin$
86+
- examples$

0 commit comments

Comments
 (0)