-
Notifications
You must be signed in to change notification settings - Fork 46
/
.golangci.yml
58 lines (56 loc) · 1.96 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
48
49
50
51
52
53
54
55
56
57
58
run:
tests: false
skip-dirs:
- vendor
linters-settings:
funlen:
# Checks the number of lines in a function.
# If lower than 0, disable the check.
# Default: 60
lines: 120
# Checks the number of statements in a function.
# If lower than 0, disable the check.
# Default: 40
statements: -1
# list all linters by run `golangci-lint help linters`
linters:
enable-all: true
disable:
# gochecknoglobals: Checks that no globals are present in Go code
- gochecknoglobals
# gochecknoinits: Checks that no init functions are present in Go code
- gochecknoinits
# Checks that errors returned from external packages are wrapped
- wrapcheck
# checks that the length of a variable's name matches its scope
- varnamelen
# Checks the struct tags.
- tagliatelle
# An analyzer to detect magic numbers.
- gomnd
# Accept Interfaces, Return Concrete Types
- ireturn
# The owner seems to have abandoned the linter. Replaced by exhaustruct.
- exhaustivestruct
# Golang linter to check the errors handling expressions
- goerr113
# finds forced type assertions
- forcetypeassert
# Checks if all structure fields are initialized
- exhaustruct
# Reports long lines
- lll
# Inspects source code for security problems
- gosec
# Tool for detection of FIXME, TODO and other comment keywords
- godox
# Check if comments end in a period
- godot
# Finds slice declarations that could potentially be pre-allocated
- prealloc
# Gci controls golang package import order and makes it always deterministic.
- gci
# Gofumpt checks whether code was gofumpt-ed.
- gofumpt
# Provides diagnostics that check for bugs, performance and style issues.
- gocritic