Skip to content

Commit 151842b

Browse files
committed
feat(golangci): Migrate usage to v2
According to: https://github.com/golangci/golangci-lint/blob/main/docs/src/docs/product/migration-guide.mdx Signed-off-by: Cezar Craciunoiu <[email protected]>
1 parent df14476 commit 151842b

File tree

2 files changed

+28
-10
lines changed

2 files changed

+28
-10
lines changed

.github/workflows/check-static.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ jobs:
6262
uses: golangci/golangci-lint-action@v7
6363
with:
6464
version: v2.0.2
65-
args: --timeout=30m --no-config --disable-all --enable=gofumpt --out-format=colored-line-number --build-tags "containers_image_storage_stub,containers_image_openpgp"
65+
args: --timeout=30m --default none --output.text.path --output.text.print-linter-name --output.text.print-issued-lines --output.text.colors --build-tags "containers_image_storage_stub,containers_image_openpgp"
6666
skip-cache: true
6767

6868
- name: golangci-lint
6969
uses: golangci/golangci-lint-action@v7
7070
with:
7171
version: v2.0.2
72-
args: --timeout=30m --out-format=colored-line-number --build-tags "containers_image_storage_stub,containers_image_openpgp"
72+
args: --timeout=30m --output.text.path --output.text.print-linter-name --output.text.print-issued-lines --output.text.colors --build-tags "containers_image_storage_stub,containers_image_openpgp"
7373
skip-cache: true
7474

7575
- name: go generate

.golangci.yaml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,32 @@
1+
version: "2"
12
run:
2-
timeout: 5m
33
issues-exit-code: 2
4-
5-
issues:
6-
exclude-dirs:
7-
- tmp/
8-
- dist/
9-
104
linters:
5+
default: none
116
enable:
12-
- unparam
137
- misspell
8+
- unparam
9+
exclusions:
10+
generated: lax
11+
presets:
12+
- comments
13+
- common-false-positives
14+
- legacy
15+
- std-error-handling
16+
paths:
17+
- tmp/
18+
- dist/
19+
- third_party$
20+
- builtin$
21+
- examples$
22+
formatters:
23+
enable:
1424
- gofumpt
25+
exclusions:
26+
generated: lax
27+
paths:
28+
- tmp/
29+
- dist/
30+
- third_party$
31+
- builtin$
32+
- examples$

0 commit comments

Comments
 (0)