Skip to content

Commit

Permalink
Improves golangci-lint configuration and workflow (#3004)
Browse files Browse the repository at this point in the history
* chore: the default Go version is based on the go.mod

* chore: use linter configuration instead of exclude-rules

* chore: update workflow
  • Loading branch information
ldez committed May 7, 2024
1 parent 2470471 commit 4d29184
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
run: git config --global --add safe.directory $GITHUB_WORKSPACE; git describe --dirty --always --tags

- name: golangci-lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
with:
# TODO: revert to latest when this issue is resolved: https://github.com/golangci/golangci-lint/issues/4695
version: v1.57.2
version: latest
github-token: ${{ secrets.GITHUB_TOKEN }}
problem-matchers: true
args: --timeout 2m

- name: Install goimports
Expand Down
14 changes: 6 additions & 8 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
run:
go: "1.20"

linters:
enable:
- asasalint
Expand Down Expand Up @@ -28,8 +25,9 @@ linters:
- unused
- whitespace

issues:
exclude-rules:
- linters:
- gosec
text: "(G501|G401|G505):"
linters-settings:
gosec:
excludes:
- G501
- G401
- G505

0 comments on commit 4d29184

Please sign in to comment.