-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.golangci.yml
95 lines (84 loc) · 3.87 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
run:
concurrency: 4
# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 10m
# exit code when at least one issue was found, default is 1
issues-exit-code: 1
# include test files or not, default is true
tests: true
linters:
enable-all: false
disable:
- unused
- exhaustivestruct # [deprecated]: Checks if all struct's fields are initialized [fast: false, auto-fix: false]
- godot # : Check if comments end in a period [fast: true, auto-fix: true]
- godox # : Tool for detection of FIXME, TODO and other comment keywords [fast: true, auto-fix: false]
- golint # [deprecated]: Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes [fast: false, auto-fix: false]
- ifshort # [deprecated]: Checks that your code uses short syntax for if-statements whenever possible [fast: true, auto-fix: false]
- interfacer # [deprecated]: Linter that suggests narrower interface types [fast: false, auto-fix: false]
- ireturn # : Accept Interfaces, Return Concrete Types [fast: true, auto-fix: false]
- lll # : Reports long lines [fast: true, auto-fix: false]
- maligned # [deprecated]: Tool to detect Go structs that would take less memory if their fields were sorted [fast: false, auto-fix: false]
- nlreturn # : Nlreturn checks for a new line before return and branch statements to increase code clarity.
- nosnakecase # [deprecated]: Checks that no snake_case names are used [fast: true, auto-fix: false]
- paralleltest # : paralleltest detects missing usage of t.Parallel() method in your Go test [fast: true, auto-fix: false]
- scopelint # [deprecated]: Scopelint checks for unpinned variables in go programs [fast: false, auto-fix: false]
- unused # [deprecated]: Finds unused struct fields [fast: false, auto-fix: false]
- unused # [deprecated]: Finds unused global variables and constants [fast: false, auto-fix: false]
- varnamelen #: checks that the length of a variable's name matches its scope [fast: false, auto-fix: false]
- wsl # : Whitespace Linter - Forces you to use empty lines! [fast: true, auto-fix: false]
# output configuration options
output:
# print lines of code with issue, default is true
print-issued-lines: false
# sorts results by: filepath, line and column
sort-results: true
# all available settings of specific linters
linters-settings:
gocritic:
# Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks.
# Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags".
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
disabled-checks:
- whyNoLint
gocyclo:
# Minimal code complexity to report.
# Default: 30 (but we recommend 10-20)
min-complexity: 10
gci:
sections:
- standard # Standard section: captures all standard packages.
- default # Default section: contains all imports that could not be matched to another section type.
- prefix(github.com/radio-t/stream-recorder) # Custom section: groups all imports with the specified Prefix.
- blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
- dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled.
skip-generated: false
custom-order: true
tagalign:
order:
- validate
- koanf
- json
- yaml
- yml
- toml
- enums
- mapstructure
- binding
- example
issues:
exclude-rules:
- path: (.+)_test.go
linters:
- funlen
- exhaustruct
exclude-dirs:
- vendor
exclude-files:
- (.+)moq_test.go
exclude-use-default: false