-
Notifications
You must be signed in to change notification settings - Fork 11
/
.golangci.yml
31 lines (30 loc) · 1.02 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
linters:
enable-all: true
disable:
# 因为只有两行语句的 case 语句里面强制要求 return 语句换行会让整个 switch 很分裂。
- wsl
- nlreturn
# 因为连 1 都算 magic number 的话,许多循环就没法写了。
# https://github.com/tommy-muehle/go-mnd/issues/3
- gomnd
# 有些情况下错误不可避免:
# https://github.com/alexkohler/dogsled/issues/2
- dogsled
# V1.0 之前有 TODO/FIXME 很正常吧。
- godox
# 有些情况下错误不可避免:
# https://github.com/mvdan/unparam/issues/43
- unparam
# 下面这两个 checker 太过激进,并不认同。
- gochecknoglobals
- gochecknoinits
# godot 要求注释必须以句号结尾,然而并不支持中文句号,放弃。
- godot
linters-settings:
errcheck:
check-type-assertions: true
ignore: '[FS]?[Pp]rint(|f|ln)|Write'
exhaustive:
default-signifies-exhaustive: true
gci:
local-prefixes: github.com/mudclient/go-mud