forked from kubegems/kubegems
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yaml
73 lines (73 loc) · 1.85 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
run:
# 不对test进行检查
tests: false
timeout: 3m
allow-parallel-runners: false
linters:
disable:
- scopelint
- errchkjson
# 不强制使用空行
- wsl
- nlreturn
# 不检查全局变量
- gochecknoglobals
# 不检查TODO等特殊注释
- godox
# 不检查方法注释必须以 "." 结尾
- godot
# 不检查使用 errors.New() and fmt.Errorf()
- goerr113
# 不检查 fmt.Printf()
- forbidigo
- gci
- golint # is deprecated (since v1.41.0)
- maligned # is deprecated (since v1.38.0)
- interfacer # is deprecated (since v1.38.0)
presets:
- bugs
- comment
- complexity
- error
- format
- import
- metalinter
- module
- performance
- sql
- style
- test
- unused
linters-settings:
lll:
line-length: 160
tagliatelle:
# Check the struck tag name case.
case:
# Use the struct field name to check the name of the struct tag.
# Default: false
use-field-name: false
rules:
# Any struct tag type can be used.
# Support string case: `camel`, `pascal`, `kebab`, `snake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower`
json: goCamel
yaml: goCamel
xml: goCamel
bson: goCamel
avro: goCamel
mapstructure: kebab
gomnd:
# List of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description.
# The numbers should be written as string.
# Values always ignored: "1", "1.0", "0" and "0.0"
ignored-numbers:
- '0666'
- '0755'
# List of file patterns to exclude from analysis.
# Values always ignored: `.+_test.go`
ignored-files:
- '.+generate.go'
# List of function patterns to exclude from analysis.
# Values always ignored: `time.Time`
ignored-functions:
- log.V*