-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix lint error * update .golangci.yml * update .github/workflows/golang-ci.yml * update .github/workflows/golang-ci.yml * update .golangci.yml
- Loading branch information
Showing
4 changed files
with
16 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
linters: | ||
disable-all: true # 关闭其他linter | ||
enable: # 下面是开启的linter列表,之后的英文注释介绍了相应linter的功能 | ||
- deadcode # Finds unused code | ||
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases | ||
- gosimple # Linter for Go source code that specializes in simplifying a code | ||
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string | ||
- ineffassign # Detects when assignments to existing variables are not used | ||
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks | ||
- structcheck # Finds unused struct fields | ||
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code | ||
# - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code | ||
- unused # Checks Go code for unused constants, variables, functions and types | ||
- varcheck # Finds unused global variables and constants | ||
- exportloopref # checks for pointers to enclosing loop variables | ||
# - golint # Carry out the stylistic conventions put forth in Effective Go and CodeReviewComments | ||
- copyloopvar | ||
|
||
linters-settings: | ||
govet: # 对于linter govet,我们手动开启了它的某些扫描规则 | ||
enable-all: true | ||
check-shadowing: true | ||
disable: | ||
- fieldalignment | ||
issues: | ||
exclude-dirs: | ||
- scripts | ||
- test | ||
- example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.