File tree Expand file tree Collapse file tree 3 files changed +41
-14
lines changed
Expand file tree Collapse file tree 3 files changed +41
-14
lines changed Original file line number Diff line number Diff line change 11# https://golangci-lint.run/usage/configuration/
22linters-settings :
33 govet :
4- check-shadowing : true
5- golint :
6- min-confidence : 0
4+ enable :
5+ - shadow
76 misspell :
87 locale : US
98 errcheck :
Original file line number Diff line number Diff line change 11# https://golangci-lint.run/usage/configuration/
22version : " 2"
3- linters-settings :
4- govet :
5- check-shadowing : true
6- misspell :
7- locale : US
8- errcheck :
9- check-type-assertions : false
10- check-blank : false
113
124linters :
135 default : none
146 enable :
157 - govet
168 - misspell
179 - errcheck
10+ settings :
11+ govet :
12+ enable :
13+ - shadow
14+ misspell :
15+ locale : US
16+ errcheck :
17+ check-type-assertions : false
18+ check-blank : false
1819 exclusions :
1920 presets :
2021 - comments
2122 - common-false-positives
2223 - legacy
2324 - std-error-handling
2425
25- formatters :
26- default : none
27-
2826issues :
2927 max-same-issues : 0
Original file line number Diff line number Diff line change 1+ name : check golangci-lint config
2+ on :
3+ pull_request :
4+ push :
5+ branches :
6+ - master
7+
8+ jobs :
9+ check :
10+ runs-on : ubuntu-latest
11+ strategy :
12+ matrix :
13+ golangci-lint-version : ["v1", "v2"]
14+ steps :
15+ - name : Check out code into the Go module directory
16+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
17+ - name : Set TAG_NAME
18+ if : ${{ matrix.golangci-lint-version == 'v1' }}
19+ run : echo "TAG_NAME=v1.64.8" >> "$GITHUB_ENV"
20+ - name : Set TAG_NAME
21+ if : ${{ matrix.golangci-lint-version != 'v1' }}
22+ env :
23+ GH_TOKEN : ${{ secrets.github_token }}
24+ run : echo "TAG_NAME=$(gh release list --repo golangci/golangci-lint --json name,isLatest --jq '.[] | select(.isLatest) | .name')" >> "$GITHUB_ENV"
25+ - name : Install golangci-lint
26+ run : |
27+ curl -sSfL "https://raw.githubusercontent.com/golangci/golangci-lint/refs/tags/$TAG_NAME/install.sh" | sh -s -- -b "$(go env GOPATH)/bin" "$TAG_NAME"
28+ echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
29+ - name : Validate golangci-lint config
30+ run : golangci-lint config verify --config=.github/.golangci.${{ matrix.golangci-lint-version }}.yml
You can’t perform that action at this time.
0 commit comments