Skip to content

Commit 2a5a7ab

Browse files
committed
ci: bump golangci-lint to v1.58.1
While here, also enable new linters. Signed-off-by: Robin Hahling <[email protected]>
1 parent 10151cc commit 2a5a7ab

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Run static checks
2727
uses: golangci/golangci-lint-action@23faadfdeb23a6f9e511beaba149bb123b5b145a
2828
with:
29-
version: v1.55.2
29+
version: v1.58.1
3030
# use our .golangci.yml and configure output to be logged in the GHA, in addition to annotating the commit.
3131
# see https://github.com/golangci/golangci-lint-action/issues/119#issuecomment-981090648 for output
3232
args: --config=.golangci.yml --verbose --out-${NO_FUTURE}format colored-line-number

.golangci.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ linters:
1111
- bidichk
1212
- bodyclose
1313
- contextcheck
14+
- copyloopvar
1415
- decorder
1516
- dupword
1617
- durationcheck
18+
- err113
1719
- errchkjson
1820
- errname
1921
- gocheckcompilerdirectives
2022
- gocritic
21-
- goerr113
2223
- gofmt
2324
- goheader
2425
- goimports
@@ -29,6 +30,7 @@ linters:
2930
- importas
3031
- ineffassign
3132
- interfacebloat
33+
- intrange
3234
- makezero
3335
- mirror
3436
- misspell
@@ -40,9 +42,11 @@ linters:
4042
- perfsprint
4143
- predeclared
4244
- promlinter
45+
- protogetter
4346
- reassign
4447
- revive
4548
- rowserrcheck
49+
- sloglint
4650
- sqlclosecheck
4751
- staticcheck
4852
- tagalign
@@ -72,11 +76,25 @@ linters-settings:
7276
disable:
7377
- fieldalignment
7478
- shadow
79+
importas:
80+
no-unaliased: true
81+
alias:
82+
- pkg: github.com/cilium/cilium/api/v1/flow
83+
alias: flowpb
84+
- pkg: github.com/cilium/cilium/api/v1/observer
85+
alias: observerpb
86+
- pkg: github.com/cilium/cilium/api/v1/relay
87+
alias: relaypb
88+
- pkg: github.com/cilium/fake/flow
89+
alias: fakeflow
90+
perfsprint:
91+
strconcat: false
7592
revive:
7693
rules:
7794
- name: package-comments
7895
disabled: true
79-
96+
sloglint:
97+
static-msg: true
8098
issues:
8199
# Default rules exclude Go doc comments check, which is rather unfortunate.
82100
# In order to enable Go doc checks, defaults rules have to be disabled.
@@ -86,5 +104,5 @@ issues:
86104
- Potential file inclusion via variable # EXC0010 gosec: False positive is triggered by 'src, err := io.ReadFile(filename)'
87105

88106
exclude-rules:
89-
- linters: [goerr113]
107+
- linters: [err113]
90108
text: "do not define dynamic errors, use wrapped static errors instead"

0 commit comments

Comments
 (0)