forked from privacypass/challenge-bypass-server
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.golangci.yaml
65 lines (60 loc) · 2.94 KB
/
.golangci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
run:
go: "1.17" ## TODO update to 1.18 once all linters support it
timeout: 3m
linters-settings:
#cyclop:
# The maximal code complexity to report.
# Default: 10
# max-complexity: 10
# The maximal average package complexity.
# If it's higher than 0.0 (float) the check is enabled
# Default: 0.0
#package-average: 10.0
errcheck:
# Report about not checking of errors in type assertions: `a := b.(MyStruct)`.
# Such cases aren't reported by default.
# Default: false
check-type-assertions: true
gocritic:
# Settings passed to gocritic.
# The settings key is the name of a supported gocritic checker.
# The list of supported checkers can be find in https://go-critic.github.io/overview.
settings:
captLocal:
# Whether to restrict checker to params only.
# Default: true
paramsOnly: false
underef:
# Whether to skip (*x).method() calls where x is a pointer receiver.
# Default: true
skipRecvDeref: false
varcheck:
# Check usage of exported fields and variables.
# Default: false
exported-fields: true
linters:
disable-all: true
enable:
## enabled by default
#- 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
- unused # Checks Go code for unused constants, variables, functions and types
#- varcheck # Finds unused global variables and constants
# ## disabled by default
- contextcheck # check the function whether use a non-inherited context
#- cyclop # checks function and package cyclomatic complexity
- errname # Checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error.
- gocritic # Provides diagnostics that check for bugs, performance and style issues.
#- gocyclo # Computes and checks the cyclomatic complexity of functions
#- nestif # Reports deeply nested if statements
- revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint.
- sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed
- stylecheck # Stylecheck is a replacement for golint
- wastedassign # wastedassign finds wasted assignment statements.
- whitespace # Tool for detection of leading and trailing whitespace