Skip to content

Commit 4fbdd6e

Browse files
committed
fix ci: update tools
1 parent 7453ce7 commit 4fbdd6e

2 files changed

Lines changed: 107 additions & 3 deletions

File tree

.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: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
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+
# Because it's easier to read without the other fields.
67+
#
68+
- 'GetPayloadsFilters'
69+
70+
#
71+
# Structures outside our control that have a ton of settings. It doesn't
72+
# make sense to specify all of the fields.
73+
#
74+
- 'cobra.Command'
75+
- 'database.*Entry'
76+
- 'http.Server'
77+
- 'logrus.*Formatter'
78+
- 'Options' # redis
79+
80+
#
81+
# Excluded because there are private fields (not capitalized) that are
82+
# not initialized. If possible, I think these should be altered.
83+
#
84+
- 'Datastore'
85+
- 'Housekeeper'
86+
- 'MockBeaconClient'
87+
- 'RelayAPI'
88+
- 'Webserver'
89+
90+
formatters:
91+
enable:
92+
- gci
93+
- gofmt
94+
- gofumpt
95+
- goimports
96+
settings:
97+
gofumpt:
98+
extra-rules: true
99+
exclusions:
100+
generated: lax
101+
paths:
102+
- third_party$
103+
- builtin$
104+
- examples$

0 commit comments

Comments
 (0)