-
-
Notifications
You must be signed in to change notification settings - Fork 583
Expand file tree
/
Copy path.golangci.yml
More file actions
30 lines (29 loc) · 1.21 KB
/
.golangci.yml
File metadata and controls
30 lines (29 loc) · 1.21 KB
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
version: "2"
linters:
enable:
- errorlint # Better error handling patterns for Go 1.13+
- errcheck # Check for unchecked errors
- staticcheck # Advanced static analysis
- unparam # Detects unused parameters
- unused # Detects unused constants, variables, functions and types
- ineffassign # Detects ineffectual assignments
- bodyclose # Check HTTP response body is closed
- gocritic # Provides bug, performance and style diagnostics
- misspell # Check for misspelled words
- nakedret # Check naked returns in large functions
- prealloc # Suggest preallocating slices
- unconvert # Remove unnecessary type conversions
- whitespace # Check for unnecessary whitespace
- nilerr # Find code that returns nil even if error is not nil
- copyloopvar # Check for loop variable issues
- sqlclosecheck # Check sql.Rows and sql.Stmt are closed
- makezero # Find slice declarations with non-zero initial length
settings:
staticcheck:
checks:
- "-ST1001" # Dot imports are used intentionally in DSL
nakedret:
max-func-lines: 30
misspell:
ignore-rules:
- Statuser