-
Notifications
You must be signed in to change notification settings - Fork 6
/
.golangci.yml
19 lines (16 loc) · 1.02 KB
/
.golangci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
linters:
disable-all: true # 关闭其他linter
enable: # 下面是开启的linter列表,之后的英文注释介绍了相应linter的功能
- 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
- unused # Checks Go code for unused constants, variables, functions and types
- exportloopref
linters-settings:
govet: # 对于linter govet,我们手动开启了它的某些扫描规则
enable-all: true
check-shadowing: true
disable:
- fieldalignment