-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gometalinter.json
62 lines (61 loc) · 1.93 KB
/
.gometalinter.json
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
{
"Vendor": true,
"Concurrency": 12,
"Deadline": "5m",
"Sort": ["linter", "severity", "path", "line"],
"Exclude": [
".*generated.*",
"_mock\\.go:",
"exported .* should have comment.* or be unexported",
"parameter .* always receives",
"comment on exported (method|struct|const|var|func|type) .* should be .*"
],
"EnableGC": true,
"Linters": {
"no-log-format": {
"Command": "grep -rEn 'log\\(.+\\)\\s*\\.(Print|Debug|Info|Warn|Warning|Error|Fatal|Panic)f\\(\"'",
"Pattern": "^(?P<path>.*?\\.go):(?P<line>\\d+)\\s*(?P<message>.*)$",
"IsFast": true
},
"no-log-uppercase": {
"Command": "grep -rEn 'log\\(.+\\)\\s*\\.(Print|Debug|Info|Warn|Warning|Error|Fatal|Panic)(f|ln)?\\(\"[A-Z]'",
"Pattern": "^(?P<path>.*?\\.go):(?P<line>\\d+)\\s*(?P<message>.*)$",
"IsFast": true
},
"no-log-period": {
"Command": "grep -rEn 'log\\(.+\\)\\s*\\.(Print|Debug|Info|Warn|Warning|Error|Fatal|Panic)(f|ln)?\\(\"(\\\"|[^\"]+)+\\.(\\\\n|\\s)*\"\\)'",
"Pattern": "^(?P<path>.*?\\.go):(?P<line>\\d+)\\s*(?P<message>.*)$",
"IsFast": true
},
"gosumcheck": {
"Command": "gosumcheck",
"Pattern": "^(?P<path>.*?\\.go):(?P<line>\\d+)(:\\d+)?\\s*(?P<message>.*)$"
},
"nakedret": {
"Command": "nakedret -l 15",
"Pattern": "^(?P<path>.*?\\.go):(?P<line>\\d+)\\s*(?P<message>.*)$"
}
},
"WarnUnmatchedDirective": false,
"DisableAll": true,
"Enable": [
"deadcode",
"goconst",
"gofmt",
"goimports",
"golint",
"gosumcheck",
"gotype",
"misspell",
"nakedret",
"no-log-format",
"no-log-period",
"no-log-uppercase",
"staticcheck",
"structcheck",
"unconvert",
"unparam",
"varcheck",
"vet"
]
}