File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 1717 uses : golangci/golangci-lint-action@v3.1.0
1818 with :
1919 working-directory : .
20- # Pin golangci-lint to a pre-1.49 version to avoid deprecated/removed linters in current .golangci.yml
21- version : v1.48.0
22- # Avoid deprecated output format warning
23- args : --out-format=colored-line-number
24-
20+ # Use latest version to fix go-critic panic in v1.48.0
21+ version : latest
22+
2523 skip-build-cache : true
2624 skip-pkg-cache : true
2725
Original file line number Diff line number Diff line change 11linters :
22 disable-all : true
33 enable :
4- - deadcode # Finds unused code
54 - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
65 - gosimple # Linter for Go source code that specializes in simplifying a code
76 - govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
87 - ineffassign # Detects when assignments to existing variables are not used
98 - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
10- - structcheck # Finds unused struct fields
119 - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
1210 - unused # Checks Go code for unused constants, variables, functions and types
13- - varcheck # Finds unused global variables and constants
1411
1512 # 比较常用的可选项
1613 - gofmt # Gofmt checks whether code was gofmt-ed.
@@ -20,7 +17,7 @@ linters:
2017
2118linters-settings :
2219 govet :
23- check-shadowing : true
20+ # Removed deprecated check-shadowing option, use shadow linter instead
2421 check-unreachable : true
2522 check-rangeloops : true
2623 check-copylocks : true
You can’t perform that action at this time.
0 commit comments