-
Notifications
You must be signed in to change notification settings - Fork 11
/
.golangci.yml
executable file
·82 lines (69 loc) · 1.77 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
# This file contains all available configuration options
# with their default values.
# options for analysis running
run:
# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 3m
# exit code when at least one issue was found, default is 1
issues-exit-code: 20
# include test files or not, default is true
tests: true
# all available settings of specific linters
linters-settings:
exhaustive:
# Presence of "default" case in switch statements satisfies exhaustiveness,
# even if all enum members are not listed.
default-signifies-exhaustive: true
errcheck:
# report about not checking of errors in type assetions: `a := b.(MyStruct)`;
check-type-assertions: true
# toggle whether to enable the errcheck built-in exclude list.
disable-default-exclusions: false
goconst:
# minimal length of string constant, 3 by default
min-len: 3
# minimal occurrences count to trigger, 3 by default
min-occurrences: 3
gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 20
goimports:
local-prefixes: github.com/G-Research/yunikorn-history-server
govet:
enable-all: true
disable:
- fieldalignment
lll:
line-length: 140
unparam:
check-exported: false
linters:
enable:
- goconst
- gocyclo
- goimports
- gosec
- gosimple
- govet
- ineffassign
- lll
- staticcheck
- typecheck
- unconvert
- unparam
- unused
- gofmt
enable-all: false
disable:
- errorlint
disable-all: false
fast: false
issues:
# exclude shadowed errors
exclude:
- declaration of "err" shadows declaration at line
# exclude generated mocks
exclude-files:
- ".*\\_mock.go$"
# lint only new code
new: true