Skip to content

Commit c2fb38f

Browse files
authored
chore: bump linter to v2 (#56)
1 parent c8b33d8 commit c2fb38f

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
go-version: [ "1.23", "1.24" ]
1414
runs-on: ubuntu-latest
1515
env:
16-
GOLANGCI_LINT_VERSION: v1.64.2
16+
GOLANGCI_LINT_VERSION: v2.0.2
1717

1818
steps:
1919
- name: Checkout code
@@ -26,10 +26,9 @@ jobs:
2626
go-version: ${{ matrix.go-version }}
2727

2828
- name: Run linter
29-
uses: golangci/golangci-lint-action@v6
29+
uses: golangci/golangci-lint-action@v7
3030
with:
3131
version: ${{ env.GOLANGCI_LINT_VERSION }}
32-
args: --go ${{ matrix.go-version }}
3332

3433
- name: Run tests
3534
run: go test -covermode=count -coverprofile=coverage.out ./...

.golangci.yml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
1+
version: "2"
12
run:
23
tests: false
3-
timeout: 5m
44

5-
linters-settings:
6-
cyclop:
7-
max-complexity: 12
8-
skip-tests: true
9-
funlen:
10-
lines: 80
11-
gofumpt:
12-
extra-rules: true
13-
gosec:
14-
excludes:
15-
- G103
5+
formatters:
6+
enable:
7+
- gofmt
8+
- gofumpt
9+
- goimports
10+
settings:
11+
gofumpt:
12+
extra-rules: true
13+
exclusions:
14+
generated: lax
1615

1716
linters:
18-
enable-all: true
17+
default: all
1918
disable:
20-
- tenv # deprecated
2119
- depguard
2220
- err113
2321
- exhaustive
2422
- exhaustruct
25-
- gci
2623
- gochecknoglobals
2724
- mnd
2825
- nlreturn
2926
- varnamelen
3027
- wrapcheck
3128
- wsl
32-
33-
issues:
34-
exclude-use-default: false
29+
settings:
30+
cyclop:
31+
max-complexity: 12
32+
funlen:
33+
lines: 80
34+
gosec:
35+
excludes:
36+
- G103
37+
exclusions:
38+
generated: lax

0 commit comments

Comments
 (0)