-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
47 lines (45 loc) · 2.3 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
47
run:
skip-files:
- ".*_test\\.go$"
linters:
disable-all: true
enable:
- deadcode # Finds unused code
# - golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
- gosimple # Linter for Go source code that specializes in simplifying a code
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
- ineffassign # Detects when assignments to existing variables are not used
- lll # Reports long lines
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
- structcheck # Finds an unused struct fields
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
- unconvert # Remove unnecessary type conversions
- unparam # Reports unused function parameters
- unused # Checks Go code for unused constants, variables, functions and types
- varcheck # Finds unused global variables and constants
# - interfacer # Linter that suggests narrower interface types
- unconvert # Remove unnecessary type conversions
- dupl # Tool for code clone detection
- goconst # Finds repeated strings that could be replaced by a constant
- gocyclo # Computes and checks the cyclomatic complexity of functions
# - maligned # Tool to detect Go structs that would take less memory if their fields were sorted
- depguard # Go linter that checks if package imports are in a list of acceptable packages
- misspell # Finds commonly misspelled English words in comments
- nakedret # Finds naked returns in functions greater than a specified function length
- prealloc # Finds slice declarations that could potentially be preallocated
# - scopelint # Scopelint checks for unpinned variables in go programs
- gocritic # The most opinionated Go source code linter
- gosec # Inspects source code for security problems
- forbidigo # Forbids identifiers
linters-settings:
errcheck:
exclude: .errcheck
lll:
line-length: 128
tab-width: 1
forbidigo:
forbid:
- ^print$
- '^println$'
exclude_godoc_examples: false