Skip to content

Commit

Permalink
chore: update and clean up golangci-lint
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <[email protected]>
  • Loading branch information
mmorel-35 committed Jan 11, 2025
1 parent 1ade121 commit 32b2cca
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
cache-dependency-path: go.sum
- uses: golangci/golangci-lint-action@v3
- uses: golangci/golangci-lint-action@v6
with:
version: v1.52
skip-cache: true
args: --timeout 10m --verbose
version: v1.63
args: --verbose
27 changes: 16 additions & 11 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,40 @@
linters:
disable-all: true
enable:
- deadcode
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- structcheck
- unused
- varcheck
- bodyclose
- contextcheck
- copyloopvar
- cyclop
- durationcheck
- errcheck
- errname
- errorlint
- exportloopref
- gocritic
- gofmt
- goimports
- gosec
- gocritic
- gosimple
- govet
- ineffassign
- staticcheck
- unused

linters-settings:
cyclop:
max-complexity: 15
gocritic:
disabled-checks:
- singleCaseSwitch
gosec:
excludes:
- G115
- G306

issues:
exclude-rules:
- path: "."
linters:
- typecheck

run:
timeout: 10m
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ typos:

.PHONY: quality
quality:
which golangci-lint || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.2
which golangci-lint || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.63.4
golangci-lint run

.PHONY: fix-typos
Expand Down

0 comments on commit 32b2cca

Please sign in to comment.