File tree Expand file tree Collapse file tree 3 files changed +63
-0
lines changed Expand file tree Collapse file tree 3 files changed +63
-0
lines changed Original file line number Diff line number Diff line change 1+ name : validate
2+ on :
3+ push :
4+ tags :
5+ - v*
6+ branches :
7+ - main
8+ - release-*
9+ pull_request :
10+ env :
11+ GO_VERSION : 1.24
12+ permissions :
13+ contents : read
14+
15+ jobs :
16+ lint :
17+ timeout-minutes : 30
18+ permissions :
19+ contents : read
20+ pull-requests : read
21+ checks : write # to allow the action to annotate code in the PR.
22+ runs-on : ubuntu-24.04
23+ steps :
24+ - uses : actions/checkout@v4
25+ with :
26+ fetch-depth : 2
27+ - uses : actions/setup-go@v5
28+ with :
29+ go-version : " ${{ env.GO_VERSION }}"
30+ - uses : golangci/golangci-lint-action@v6
31+ with :
32+ version : v1.64
33+ # Extra linters, only checking new code from a pull request.
34+ - name : lint-extra
35+ if : github.event_name == 'pull_request'
36+ run : |
37+ golangci-lint run --config .golangci-extra.yml --new-from-rev=HEAD~1
38+
Original file line number Diff line number Diff line change 1+ # This is golangci-lint config file which is used to check NEW code in
2+ # github PRs only (see lint-extra in .github/workflows/validate.yml).
3+ #
4+ # For the default linter config, see .golangci.yml. This config should
5+ # only enable additional linters not enabled in the default config.
6+
7+ linters :
8+ disable-all : true
9+ enable :
10+ - godot
11+ - revive
12+
Original file line number Diff line number Diff line change 1+ # For documentation, see https://golangci-lint.run/usage/configuration/
2+
3+ linters :
4+ enable :
5+ - gofumpt
6+ - errorlint
7+ - unconvert
8+ - unparam
9+
10+ linters-settings :
11+ govet :
12+ enable :
13+ - nilness
You can’t perform that action at this time.
0 commit comments