-
Notifications
You must be signed in to change notification settings - Fork 4
/
.golangci.yml
68 lines (58 loc) · 1.63 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
run:
modules-download-mode: readonly
linters-settings:
errcheck:
check-type-assertions: true
misspell:
locale: US
unused:
check-exported: false
gocyclo:
min-complexity: 10
goimports:
local-prefixes: github.com/ibraimgm/libcmd
linters:
fast: true
enable:
- goimports
- staticcheck
- unused
- scopelint
- gosimple
- gosec
- govet
- golint
- gocyclo
- misspell
issues:
exclude-rules:
# ignore some linters on test code
- path: _test\.go
linters:
- gocyclo
# goimports: We should care only when changing files
- text: File is not `goimports`-ed
linters:
- goimports
# errcheck: Almost all programs ignore errors on these functions and in most cases it's ok
- text: Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked
linters:
- errcheck
# staticcheck: Developers tend to write in C-style with an explicit 'break' in a 'switch', so it's ok to ignore
- text: ineffective break statement. Did you mean to break out of the outer loop
linters:
- staticcheck
# gosec: Too many issues in popular repos
- text: (Expect directory permissions to be 0750 or less|Expect file permissions to be 0600 or less)
linters:
- gosec
# gosec: Duplicated errcheck checks
- text: G104
linters:
- gosec
# gosec: False positive is triggered by 'src, err := ioutil.ReadFile(filename)'
- text: Potential file inclusion via variable
linters:
- gosec
exclude-use-default: false
new: false