-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
103 lines (94 loc) · 3.74 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
run:
timeout: 5m
linters-settings:
errcheck:
check-type-assertions: true
goconst:
min-len: 2
min-occurrences: 3
gocritic:
disabled-checks:
- paramTypeCombine
enabled-tags:
- diagnostic
- performance
- style
disabled-tags:
- experimental
- opinionated
govet:
check-shadowing: true
nolintlint:
require-explanation: true
require-specific: true
stylecheck:
checks: ["all", "-ST1000"]
funlen:
# Checks the number of lines in a function.
# If lower than 0, disable the check.
# Default: 60
lines: 100
# Checks the number of statements in a function.
# If lower than 0, disable the check.
# Default: 40
statements: 50
revive:
rules:
- name: package-comments
disabled: true
linters:
disable-all: true
enable:
- errcheck # errcheck is a program for checking for unchecked errors in Go code.
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
- gosimple # Linter for Go source code that specializes in simplifying code
- ineffassign # Detects when assignments to existing variables are not used
- goimports
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
- staticcheck
- unused # Checks Go code for unused constants, variables, functions and types
- goconst # Finds repeated strings that could be replaced by a constant
- gocyclo # Computes and checks the cyclomatic complexity of functions
- gosec
- dupl
- bodyclose # checks whether HTTP response body is closed successfully
- depguard
- dogsled
- exportloopref
- misspell
- nolintlint
- nakedret
- prealloc # Finds slice declarations that could potentially be pre-allocated
- predeclared
- structcheck
- stylecheck # Stylecheck is a replacement for golint
- thelper
- tparallel # tparallel detects inappropriate usage of t.Parallel() method in your Go test codes
- unconvert # Remove unnecessary type conversions
- unparam # Reports unused function parameters
- whitespace # Tool for detection of leading and trailing whitespace
- gochecknoinits
- gocritic # Provides diagnostics that check for bugs, performance and style issues.
- gofmt
- goprintffuncname
- noctx # finds sending http request without context.Context
- funlen
- durationcheck # check for two durations multiplied together
- execinquery # execinquery is a linter about query string checker in Query function which reads your Go src files and warning it finds
- exhaustive # check exhaustiveness of enum switch statements
- exportloopref # checks for pointers to enclosing loop variables
- gocognit # Computes and checks the cognitive complexity of functions
- godot # Check if comments end in a period
- makezero # Finds slice declarations with non-zero initial length
- nakedret # Finds naked returns in functions greater than a specified function length
- nilerr # Finds the code that returns nil even if it checks that the error is not nil.
- nilnil # Checks that there is no simultaneous return of nil error and an invalid value.
- revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint.
- rowserrcheck # checks whether Err of rows is checked successfully
- sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed.
- usestdlibvars # A linter that detect the possibility to use variables/constants from the Go standard library.
- wastedassign # wastedassign finds wasted assignment statements.
issues:
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 0