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
+74
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,80 @@ linters-settings:
3
3
check-shadowing: true
4
4
misspell:
5
5
locale: US
6
+
exhaustive:
7
+
default-signifies-exhaustive: true
8
+
9
+
linters:
10
+
enable:
11
+
- asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
12
+
- bodyclose # checks whether HTTP response body is closed successfully
13
+
- deadcode # Finds unused code
14
+
- depguard # Go linter that checks if package imports are in a list of acceptable packages
15
+
- dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
16
+
- dupl # Tool for code clone detection
17
+
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
18
+
- exhaustive # check exhaustiveness of enum switch statements
19
+
- exportloopref # checks for pointers to enclosing loop variables
20
+
- gci # Gci control golang package import order and make it always deterministic.
21
+
- gochecknoglobals # Checks that no globals are present in Go code
22
+
- gochecknoinits # Checks that no init functions are present in Go code
23
+
- gocognit # Computes and checks the cognitive complexity of functions
24
+
- goconst # Finds repeated strings that could be replaced by a constant
25
+
- gocritic # The most opinionated Go source code linter
26
+
- godox # Tool for detection of FIXME, TODO and other comment keywords
27
+
- goerr113 # Golang linter to check the errors handling expressions
28
+
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
29
+
- gofumpt # Gofumpt checks whether code was gofumpt-ed.
30
+
- goheader # Checks is file header matches to pattern
31
+
- goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
32
+
- golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
33
+
- 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.
34
+
- goprintffuncname # Checks that printf-like functions are named with `f` at the end
35
+
- gosec # Inspects source code for security problems
36
+
- gosimple # Linter for Go source code that specializes in simplifying a code
37
+
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
38
+
- ineffassign # Detects when assignments to existing variables are not used
39
+
- misspell # Finds commonly misspelled English words in comments
40
+
- nakedret # Finds naked returns in functions greater than a specified function length
41
+
- noctx # noctx finds sending http request without context.Context
42
+
- scopelint # Scopelint checks for unpinned variables in go programs
43
+
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
44
+
- structcheck # Finds unused struct fields
45
+
- stylecheck # Stylecheck is a replacement for golint
46
+
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
47
+
- unconvert # Remove unnecessary type conversions
48
+
- unparam # Reports unused function parameters
49
+
- unused # Checks Go code for unused constants, variables, functions and types
50
+
- varcheck # Finds unused global variables and constants
51
+
- whitespace # Tool for detection of leading and trailing whitespace
52
+
disable:
53
+
- funlen # Tool for detection of long functions
54
+
- gocyclo # Computes and checks the cyclomatic complexity of functions
55
+
- godot # Check if comments end in a period
56
+
- gomnd # An analyzer to detect magic numbers.
57
+
- lll # Reports long lines
58
+
- maligned # Tool to detect Go structs that would take less memory if their fields were sorted
59
+
- nestif # Reports deeply nested if statements
60
+
- nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity
61
+
- nolintlint # Reports ill-formed or insufficient nolint directives
62
+
- prealloc # Finds slice declarations that could potentially be preallocated
63
+
- rowserrcheck # checks whether Err of rows is checked successfully
64
+
- sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed.
65
+
- testpackage # linter that makes you use a separate _test package
66
+
- wsl # Whitespace Linter - Forces you to use empty lines!
67
+
68
+
issues:
69
+
exclude-rules:
70
+
# Allow complex tests, better to be self contained
0 commit comments