2019-03-28 14:31:54 +00:00
|
|
|
# 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
|
2019-10-08 10:26:27 +00:00
|
|
|
- tools/syz-trace2syz
|
2019-05-15 08:04:22 +00:00
|
|
|
# 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
|
2019-03-28 14:31:54 +00:00
|
|
|
|
|
|
|
linters:
|
|
|
|
enable:
|
|
|
|
- lll
|
2019-04-23 13:58:23 +00:00
|
|
|
- vet
|
2019-03-28 14:31:54 +00:00
|
|
|
- gofmt
|
|
|
|
- golint
|
|
|
|
- structcheck
|
|
|
|
- unconvert
|
|
|
|
- deadcode
|
|
|
|
- goconst
|
|
|
|
- unused
|
|
|
|
- gosimple
|
|
|
|
- varcheck
|
|
|
|
- misspell
|
|
|
|
- gocyclo
|
|
|
|
- vetshadow
|
|
|
|
- megacheck
|
2019-04-23 13:58:23 +00:00
|
|
|
- stylecheck
|
2019-03-28 14:31:54 +00:00
|
|
|
- govet
|
|
|
|
disable:
|
2019-04-23 13:58:23 +00:00
|
|
|
- typecheck
|
2019-03-28 14:31:54 +00:00
|
|
|
- ineffassign
|
|
|
|
- errcheck
|
2019-04-23 13:58:23 +00:00
|
|
|
- interfacer
|
|
|
|
- unparam
|
|
|
|
- nakedret
|
|
|
|
- prealloc
|
|
|
|
- scopelint
|
|
|
|
- gocritic
|
2019-03-28 14:31:54 +00:00
|
|
|
|
|
|
|
linters-settings:
|
|
|
|
lll:
|
|
|
|
line-length: 120
|
|
|
|
gocyclo:
|
|
|
|
min-complexity: 24
|
|
|
|
dupl:
|
|
|
|
threshold: 60
|
2019-04-23 13:58:23 +00:00
|
|
|
goconst:
|
|
|
|
min-len: 7
|
|
|
|
min-occurrences: 4
|
2019-03-28 14:31:54 +00:00
|
|
|
|
|
|
|
issues:
|
|
|
|
exclude-use-default: false
|
|
|
|
exclude:
|
|
|
|
- "exported .* should have comment"
|
|
|
|
- "comment on .* should be of the form"
|
|
|
|
- "declaration of \"err\" shadows"
|
2019-09-17 10:24:38 +00:00
|
|
|
- "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"
|
2019-03-28 14:31:54 +00:00
|
|
|
exclude-rules:
|
|
|
|
- path: (pkg/csource/generated.go|pkg/report/linux.go|pkg/build/linux_generated.go)
|
|
|
|
linters:
|
|
|
|
- lll
|
2019-04-23 13:58:23 +00:00
|
|
|
- path: (sys/.*/init.*|sys/targets/common.go)
|
|
|
|
text: "don't use ALL_CAPS in Go names"
|