aboutsummaryrefslogtreecommitdiffstats
path: root/.golangci.yml
blob: 69fca755c31ddcc4a0271af0b59bdb42a7aae7ce (plain)
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
# 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
  # 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

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
  exclude:
    - "exported .* should have comment"
    - "comment on .* should be of the form"
    - "declaration of \"err\" shadows"
  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"