-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
47 lines (39 loc) · 1.29 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
---
run:
deadline: "5m"
tests: true
skip-dirs:
- "build"
- "mocks"
skip-files:
- ".*_templ.go$"
output:
format: "colored-line-number"
linters:
disable-all: true
enable:
# Visit https://golangci-lint.run/usage/linters/
# Default linters
- "errcheck" # Detect unchecked errors
- "gosimple" # Suggest code simplifications
- "govet" # Reports suspicious constructs
- "ineffassign" # Detects unused variable assignments
- "staticcheck" # go vet on steroids
- "unused" # Detect unused constants, variables, functions and types
- "gocyclo" # or "cyclop", # Detect cyclomatic complexity
- "gofumpt" # Or "gofmt", # Enforce standard formatting
- "goimports" # Ensure standard import formatting/ordering
- "revive" # General purpose linter
- "unconvert" # Detect unnecessary type conversions
- "unparam" # Detect unused function parameters
- "bodyclose" # Check whether HTTP response bodies are closed
- "errorlint" # Find code that will cause problems with Go's error wrapping scheme
- "nakedret" # Detect naked returns
- "sqlclosecheck" # Ensure sql.Rows and sql.Stmt are closed
linters-settings:
gocyclo:
min-complexity: 30
revive:
rules:
- name: var-naming
disabled: true