forked from google/syzkaller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
75 lines (70 loc) · 1.67 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
# Copyright 2019 syzkaller project authors. All rights reserved.
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
run:
deadline: 8m
skip-dirs:
- pkg/kd
- tools/syz-trace2syz
# Autogenerated files take too much time and memory to load,
# even if we skip them with skip-dirs.
# So we define this tag and use it in the autogenerated files.
build-tags:
- codeanalysis
output:
print-linter-name: false
linters:
enable:
- lll
- vet
- gofmt
- golint
- structcheck
- unconvert
- deadcode
- goconst
- unused
- gosimple
- varcheck
- misspell
- gocyclo
- vetshadow
- megacheck
- stylecheck
- govet
disable:
- typecheck
- ineffassign
- errcheck
- interfacer
- unparam
- nakedret
- prealloc
- scopelint
- gocritic
linters-settings:
lll:
line-length: 120
gocyclo:
min-complexity: 24
dupl:
threshold: 60
goconst:
min-len: 7
min-occurrences: 4
issues:
exclude-use-default: false
max-same-issues: 0
exclude:
- "exported .* should have comment"
- "comment on .* should be of the form"
- "declaration of \"err\" shadows"
- "should not use ALL_CAPS in Go names"
- "at least one file in a package should have a package comment"
- "methods on the same type should have the same receiver name"
- "assigning the result of this type assertion to a variable"
exclude-rules:
- path: (pkg/csource/generated.go|pkg/report/linux.go|pkg/build/linux_generated.go)
linters:
- lll
- path: (sys/.*/init.*|sys/targets/common.go)
text: "don't use ALL_CAPS in Go names"