File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77name : Go
88
9- on : [push, pull_request]
9+ " on " : [push, pull_request]
1010
1111defaults :
1212 run :
@@ -22,18 +22,11 @@ jobs:
2222 - name : Set up Go
2323 uses : actions/setup-go@v4
2424 with :
25- go-version : ' 1.23.0 '
25+ go-version : stable
2626
2727 - name : Build
2828 run : go build -v
2929 - name : Test
3030 run : |
3131 set -e
32- go install github.com/go-critic/go-critic/cmd/gocritic@latest
33- # go install golang.org/x/tools/cmd/goimports@latest
34- go install golang.org/x/lint/golint@latest
35- go install github.com/gordonklaus/ineffassign@latest
36- pip install pre-commit
37- pre-commit install
38- pre-commit run --all-files
3932 go test -v
Original file line number Diff line number Diff line change 11---
22repos :
3- - repo : https://github.com/jessp01/pre-commit-golang.git
4- rev : v0.5.4
5- hooks :
6- - id : go-fmt
3+ # - repo: https://github.com/jessp01/pre-commit-golang.git
4+ # rev: v0.5.9
5+ # hooks:
6+ # - id: go-fmt
77 # - id: go-imports
8- - id : go-vet
9- - id : go-lint
10- - id : go-critic
11- - id : go-ineffassign
8+ # - id: go-vet
9+ # - id: go-lint
10+ # - id: go-critic
11+ # - id: go-ineffassign
1212 # - repo: https://github.com/crate-ci/typos
1313 # rev: v1.32.0
1414 # hooks:
1515 # - id: typos
1616 # exclude_types: [yaml]
1717 # exclude: go.*
18+ - repo : https://github.com/golangci/golangci-lint.git
19+ rev : v2.13.2
20+ hooks :
21+ - id : golangci-lint-full
22+ name : golangci-lint-full
23+ description : Fast linters runner for Go. Runs on all files in the module
24+ entry : golangci-lint run --fix
25+ types : [go]
26+ language : golang
27+ require_serial : true
28+ pass_filenames : false
Original file line number Diff line number Diff line change @@ -214,11 +214,7 @@ pre-commit install
214214
215215Following that, these tests will run every time you invoke `git commit`:
216216```sh
217- go fmt...................................................................Passed
218- go imports...............................................................Passed
219- go vet...................................................................Passed
220- go lint..................................................................Passed
221- go-critic................................................................Passed
217+ golangci-lint-full.......................................................Passed
222218```
223219
224220- Submit a pull request and include a succinct description of the feature or issue it addresses
You can’t perform that action at this time.
0 commit comments