-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
93 lines (85 loc) · 2.49 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
91
92
93
linters:
enable-all: true
disable:
- depguard
- testpackage
- mnd
- exportloopref
- tagliatelle
# TODO: fix issues and enable linters below
- funlen
- err113
- wrapcheck
- cyclop
- nestif
- gocritic
- goconst
- gosec
- godox
- gocognit
linters-settings:
stylecheck:
checks:
- ST1000
- ST1001
- ST1003
- ST1006
- ST1008
- ST1011
- ST1012
- ST1013
- ST1015
- ST1016
- ST1017
- ST1018
- ST1019
- ST1020
- ST1021
- ST1022
- ST1023
exhaustruct:
exclude:
- 'github.com\/urfave\/cli\/v[0-9]+\..+' # many fields are optional
- 'github.com\/3lvia\/cli\/pkg\/auth\.AzLoginCommandOptions' # every field is optional
- 'github.com\/3lvia\/cli\/pkg\/build\.GenerateDockerfileOptions' # every field is optional
- 'github.com\/3lvia\/cli\/pkg\/command\.RunOptions' # every field is optional
issues:
exclude-rules:
# urfave/cli uses this naming scheme, so we stick to it.
- linters:
- varnamelen
text: "parameter name 'c' is too short for the scope of its usage"
# There is not other way to do this; we have to use var for structs.
- linters:
- gochecknoglobals
text: "Dotnet.* is a global variable"
# There is not other way to do this; we have to use var for structs.
- linters:
- gochecknoglobals
text: "Python.* is a global variable"
# There is not other way to do this; we have to use var for structs.
- linters:
- gochecknoglobals
text: "Go.* is a global variable"
# There is not other way to do this; we have to use var for structs.
- linters:
- gochecknoglobals
text: "Templates is a global variable"
# There is not other way to do this; we have to use var for structs.
- linters:
- gochecknoglobals
text: "Languages is a global variable"
# Does not make sense when looking at the bigger picture.
- linters:
- revive
text: "exported: func name will be used as scan.ScanImage by other packages, and that stutters; consider calling this Image"
# We have to print to the user.
- linters:
- forbidigo
text: "use of `fmt.Println` forbidden by pattern"
# We want to output user-readable error messages, not long stack traces.
- linters:
- revive
text: "error-strings: error strings should not be capitalized or end with punctuation or a newline"
output:
show-stats: true