-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.golangci.yml
45 lines (45 loc) · 1.54 KB
/
.golangci.yml
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
run:
timeout: 5m
linters:
enable:
# Prevent improper nolint directives.
- nolintlint
# Inspect source code for potential security problems. This check has a fairly high false positive rate,
# comment with // nolint:gosec where not relevant.
- gosec
# Replace golint.
- revive
# Complain about deeply nested if cases.
- nestif
# Make Go code more readable.
- gocritic
# Keep the cyclomatic complexity of functions to a reasonable level.
- gocyclo
# Complain about cognitive complexity of functions.
- gocognit
# Find repeated strings that could be converted into constants.
- goconst
# Complain about unnecessary type conversions.
- unconvert
# Complain about unused parameters. These should be replaced with underscores.
- unparam
# Check for non-ASCII identifiers.
- asciicheck
# Check for HTTP response body being closed. Sometimes, you may need to disable this using // nolint:bodyclose.
- bodyclose
# Check for pointers in loops. This is a typical bug source.
- exportloopref
# Prevent dogsledding (mass-ignoring return values). This typically indicates missing error handling.
- dogsled
# Make code properly formatted.
- gofmt
# Prevent faulty error checks.
- nilerr
# Prevent direct error checks that won't work with wrapped errors.
- errorlint
# Find slice usage that could potentially be preallocated.
- prealloc
# Check for improper duration handling.
- durationcheck
issues:
exclude-use-default: false