-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.golangci.yaml
147 lines (131 loc) · 5.09 KB
/
.golangci.yaml
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
run:
timeout: 10m
output:
sort-results: true
linters:
enable-all: true
disable:
# The following are deprecated
- deadcode
- golint
- interfacer
- maligned
- scopelint
- structcheck
- varcheck
# The following are not useful and/or produce too many false positives
- cyclop
- depguard
- exhaustivestruct
- exhaustruct
- forbidigo
- forcetypeassert
- funlen
- gci
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocyclo
- godot
- godox
- gofumpt
- gomnd
- ifshort
- interfacebloat
- ireturn
- lll
- nestif
- nilnil
- nlreturn
- nonamedreturns
- nosnakecase
- paralleltest
- tagliatelle
- testableexamples
- testpackage
- varnamelen
- whitespace
- wrapcheck
- wsl
linters-settings:
errcheck:
exclude-functions:
# Too many false positives
- github.com/spf13/viper.BindPFlag
- github.com/spf13/viper.BindPFlags
- (*github.com/tiiuae/rclgo/pkg/rclgo.Logger).Debug
- (*github.com/tiiuae/rclgo/pkg/rclgo.Logger).Debugf
- (*github.com/tiiuae/rclgo/pkg/rclgo.Logger).Debugln
- (*github.com/tiiuae/rclgo/pkg/rclgo.Logger).Error
- (*github.com/tiiuae/rclgo/pkg/rclgo.Logger).Errorf
- (*github.com/tiiuae/rclgo/pkg/rclgo.Logger).Errorln
- (*github.com/tiiuae/rclgo/pkg/rclgo.Logger).Fatal
- (*github.com/tiiuae/rclgo/pkg/rclgo.Logger).Fatalf
- (*github.com/tiiuae/rclgo/pkg/rclgo.Logger).Fatalln
- (*github.com/tiiuae/rclgo/pkg/rclgo.Logger).Info
- (*github.com/tiiuae/rclgo/pkg/rclgo.Logger).Infof
- (*github.com/tiiuae/rclgo/pkg/rclgo.Logger).Infoln
- (*github.com/tiiuae/rclgo/pkg/rclgo.Logger).Warn
- (*github.com/tiiuae/rclgo/pkg/rclgo.Logger).Warnf
- (*github.com/tiiuae/rclgo/pkg/rclgo.Logger).Warnln
- github.com/tiiuae/rclgo/pkg/rclgo.Uninit
errorlint:
errorf: false
gocritic:
disabled-checks:
# Too many false positives
- commentFormatting
- dupSubExpr
- ifElseChain
stylecheck:
checks:
- all
# Too many false positives
- -ST1000
- -ST1003
- -ST1003
- -ST1006
- -ST1016
- -ST1020
- -ST1021
- -ST1022
- -ST1005
issues:
exclude-use-default: false
exclude:
# Too many false positives
- "var-naming: don't use underscores in Go names;"
- "error-strings: error strings should not be capitalized or end with punctuation or a newline"
- "err113: do not define dynamic errors, use wrapped static errors instead:"
# The following are the default exclusions, some of which are disabled.
# EXC0001 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)?|.*print(f|ln)?|os\.(Un)?Setenv). is not checked
# EXC0002 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)
# EXC0003 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
# EXC0004 govet: Common false positives
# - (possible misuse of unsafe.Pointer|should have signature)
# EXC0005 staticcheck: Developers tend to write in C-style with an explicit 'break' in a 'switch', so it's ok to ignore
# - ineffective break statement. Did you mean to break out of the outer loop
# EXC0006 gosec: Too many false-positives on 'unsafe' usage
- Use of unsafe calls should be audited
# EXC0007 gosec: Too many false-positives for parametrized shell calls
# - Subprocess launch(ed with variable|ing should be audited)
# EXC0008 gosec: Duplicated errcheck checks
- (G104|G307)
# EXC0009 gosec: Too many issues in popular repos
# - (Expect directory permissions to be 0750 or less|Expect file permissions to be 0600 or less)
# EXC0010 gosec: False positive is triggered by 'src, err := ioutil.ReadFile(filename)'
- Potential file inclusion via variable
# EXC0011 stylecheck: 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)
# EXC0012 revive: Annoying issue about not having a comment. The rare codebase has such comments
- exported (.+) should have comment( \(or a comment on this block\))? or be unexported
# EXC0013 revive: Annoying issue about not having a comment. The rare codebase has such comments
- package comment should be of the form "(.+)...
# EXC0014 revive: Annoying issue about not having a comment. The rare codebase has such comments
- comment on exported (.+) should be of the form "(.+)..."
# EXC0015 revive: Annoying issue about not having a comment. The rare codebase has such comments
- should have a package comment, unless it's in another file for this package