You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .golangci.yml
+32-2
Original file line number
Diff line number
Diff line change
@@ -15,14 +15,22 @@ linters-settings:
15
15
linters:
16
16
enable:
17
17
- asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
18
+
- bidichk # Checks for dangerous unicode character sequences
18
19
- bodyclose # checks whether HTTP response body is closed successfully
20
+
- contextcheck # check the function whether use a non-inherited context
19
21
- deadcode # Finds unused code
22
+
- decorder # check declaration order and count of types, constants, variables and functions
20
23
- depguard # Go linter that checks if package imports are in a list of acceptable packages
21
24
- dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
22
25
- dupl # Tool for code clone detection
26
+
- durationcheck # check for two durations multiplied together
23
27
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
28
+
- errchkjson # Checks types passed to the json encoding functions. Reports unsupported types and optionally reports occations, where the check for the returned error can be omitted.
29
+
- errname # Checks that sentinel errors are prefixed with the `Err` and error types are suffixed with the `Error`.
30
+
- errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.
24
31
- exhaustive # check exhaustiveness of enum switch statements
25
32
- exportloopref # checks for pointers to enclosing loop variables
33
+
- forcetypeassert # finds forced type assertions
26
34
- gci # Gci control golang package import order and make it always deterministic.
27
35
- gochecknoglobals # Checks that no globals are present in Go code
28
36
- gochecknoinits # Checks that no init functions are present in Go code
@@ -35,40 +43,62 @@ linters:
35
43
- gofumpt # Gofumpt checks whether code was gofumpt-ed.
36
44
- goheader # Checks is file header matches to pattern
37
45
- goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
38
-
- golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
46
+
- gomoddirectives # Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod.
39
47
- gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations.
40
48
- goprintffuncname # Checks that printf-like functions are named with `f` at the end
41
49
- gosec # Inspects source code for security problems
42
50
- gosimple # Linter for Go source code that specializes in simplifying a code
43
51
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
52
+
- grouper # An analyzer to analyze expression groups.
53
+
- importas # Enforces consistent import aliases
44
54
- ineffassign # Detects when assignments to existing variables are not used
45
55
- misspell # Finds commonly misspelled English words in comments
46
56
- nakedret # Finds naked returns in functions greater than a specified function length
57
+
- nilerr # Finds the code that returns nil even if it checks that the error is not nil.
58
+
- nilnil # Checks that there is no simultaneous return of `nil` error and an invalid value.
47
59
- noctx # noctx finds sending http request without context.Context
48
-
- scopelint # Scopelint checks for unpinned variables in go programs
60
+
- predeclared # find code that shadows one of Go's predeclared identifiers
0 commit comments