-
Notifications
You must be signed in to change notification settings - Fork 16
/
.golangci-lint
45 lines (40 loc) · 1.71 KB
/
.golangci-lint
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
[output]
format = "colored-line-number"
[linters]
enable = [
# Visit https://golangci-lint.run/usage/linters/
# for the full, current list of available linters.
# Default linters
"deadcode", # Finds unused code
"errcheck", # Detect unchecked errors
"gosimple", # Suggest code simplifications
"govet", # Reports suspicious constructs
"ineffassign", # Detects unused variable assignments
"staticcheck", # go vet on steroids
# "structcheck", # Find unused struct fields
"typecheck", # Standard Go type checks
"unused", # Detect unused constants, variables, functions and types
"varcheck", # Find unused global variables and constants
# Suggested additional linters
"gocyclo", # or "cyclop", # Detect cyclomatic complexity
"goconst", # Detect repeated values that can be made constants
"gofumpt", # Or "gofmt", # Enforce standard formatting
"goimports", # Ensure standard import formatting/ordering
"misspell", # Fix spelling errors
"revive", # General purpose linter
"unconvert", # Detect unnecessary type conversions
"unparam", # Detect unused function parameters
# Optional
"bodyclose", # Check whether HTTP response bodies are closed
# "goerr113", # Enforce standard error handling practices
# "depguard", # Forbid certain package imports
# "dupl", # Detect duplicate code
# "errchkjson", # some JSON-specific checks
# "gomnd", # Magic number detection
"nakedret", # Detect naked returns
# "rowserrcheck", # Check whether Err of rows is checked
# "sqlclosecheck", # Ensure sql.Rows and sql.Stmt are closed
"tparallel", # Detects inappropriate use of t.Parallel()
]
[issues]
exclude-use-default = false