-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
90 lines (77 loc) · 3.28 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
# spell-checker: words gocognit gocritic forbidigo setenv unmarshal gosec govet
linters-settings:
gocognit:
min-complexity: 20
misspell:
locale: UK
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
govet:
settings:
printf:
funcs:
- "(*github.com/op/go-logging.Logger).Fatal"
- "(*github.com/op/go-logging.Logger).Fatalf"
- "(*github.com/op/go-logging.Logger).Panic"
- "(*github.com/op/go-logging.Logger).Panicf"
- "(*github.com/op/go-logging.Logger).Critical"
- "(*github.com/op/go-logging.Logger).Criticalf"
- "(*github.com/op/go-logging.Logger).Error"
- "(*github.com/op/go-logging.Logger).Errorf"
- "(*github.com/op/go-logging.Logger).Warning"
- "(*github.com/op/go-logging.Logger).Warningf"
- "(*github.com/op/go-logging.Logger).Notice"
- "(*github.com/op/go-logging.Logger).Noticef"
- "(*github.com/op/go-logging.Logger).Info"
- "(*github.com/op/go-logging.Logger).Infof"
- "(*github.com/op/go-logging.Logger).Debug"
- "(*github.com/op/go-logging.Logger).Debugf"
nolintlint:
# Disable to ensure that all nolint directives actually have an effect. Default is true.
allow-unused: false
# Disable to ensure that nolint directives don't have a leading space. Default is true.
allow-leading-space: true
# Enable to require nolint directives to mention the specific linter being suppressed. Default is false.
require-specific: true
linters:
enable-all: true
disable:
- maligned
- staticcheck
- golint
- forbidigo
- interfacer
- maligned
- scopelint
- stylecheck # covered by revive
- godot # No.
- gomnd # I like the idea, god this is annoying.
- exhaustivestruct # Nope.
- varnamelen # Nice idea, but slightly annoying
- gci
issues:
exclude-use-default: false
exclude:
# errcheck: Almost all programs ignore errors on these functions and in most cases it's ok
- Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked
# Unmarshal XML and JSON are obvious in what they do. Lets not.
- exported method `.+\.Unmarshal(?:XML|JSON)` should have comment or be unexported
# golint: Annoying issue about not having a comment. The rare codebase has such comments
# - (comment on exported (method|function|type|const)|should have( a package)? comment|comment should be of the form)
# golint: False positive when tests are defined in package 'test'
- func name will be used as test\.Test.* by other packages, and that stutters; consider calling this
# govet: Common false positives
- (possible misuse of unsafe.Pointer|should have signature)
# gosec: Too many false-positives for parametrized shell calls
- Subprocess launch(ed with variable|ing should be audited)
# gosec: Duplicated errcheck checks
- G104
# gosec: Too many issues in popular repos
- (Expect directory permissions to be 0750 or less|Expect file permissions to be 0600 or less)
# gosec: False positive is triggered by 'src, err := ioutil.ReadFile(filename)'
- Potential file inclusion via variable