File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 with :
1616 go-version : ${{ matrix.go }}
1717 - name : Install Linters
18- run : " curl -sSfL https://raw.githubusercontent. com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.52.2 "
18+ run : " go install github. com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.4.0 "
1919 - name : Test
2020 run : |
2121 sh ./run_tests.sh
Original file line number Diff line number Diff line change 1+ version : " 2"
2+ run :
3+ timeout : 10m
4+ linters :
5+ default : none
6+ enable :
7+ - asciicheck
8+ - bidichk
9+ - bodyclose
10+ - dupword
11+ - durationcheck
12+ - errcheck
13+ - errorlint
14+ - govet
15+ - grouper
16+ - ineffassign
17+ - misspell
18+ - nilerr
19+ - nosprintfhostport
20+ - paralleltest
21+ - reassign
22+ - rowserrcheck
23+ - staticcheck
24+ - tparallel
25+ - unconvert
26+ - unused
27+ - usetesting
28+ settings :
29+ staticcheck :
30+ checks :
31+ - S1*
32+ formatters :
33+ enable :
34+ - gofmt
35+ - goimports
Original file line number Diff line number Diff line change 22
33set -ex
44
5- # The script does automatic checking on a Go package and its sub-packages, including:
6- # 1. race detector (http://blog.golang.org/race-detector)
7- # 2. gofmt (http://golang.org/cmd/gofmt/)
8- # 3. golint (https://github.com/golang/lint)
9- # 4. go vet (http://golang.org/cmd/vet)
10- # 5. gosimple (https://github.com/dominikh/go-simple)
11- # 6. unconvert (https://github.com/mdempsky/unconvert)
12- # 7. ineffassign (https://github.com/gordonklaus/ineffassign)
13- # 8. misspell (https://github.com/client9/misspell)
14- # 9. deadcode (https://github.com/remyoudompheng/go-misc/tree/master/deadcode)
5+ # This script runs the tests for all packages in the repository and then uses
6+ # golangci-lint (github.com/golangci/golangci-lint) to run all linters defined
7+ # by the configuration in .golangci.yml.
158
169# run tests
1710env GORACE=" halt_on_error=1" go test -race ./...
1811
19- # golangci-lint (github.com/golangci/golangci-lint) is used to run each each
20- # static checker.
21-
22- # check linters
23- golangci-lint run --disable-all --deadline=10m \
24- --enable=gofmt \
25- --enable=revive \
26- --enable=vet \
27- --enable=gosimple \
28- --enable=unconvert \
29- --enable=ineffassign \
30- --enable=misspell \
31- --enable=deadcode
12+ # run linters
13+ golangci-lint run
You can’t perform that action at this time.
0 commit comments