File tree Expand file tree Collapse file tree 10 files changed +445
-410
lines changed
Expand file tree Collapse file tree 10 files changed +445
-410
lines changed Original file line number Diff line number Diff line change 2525
2626 - name : Build
2727 run : go build -v .
28+
29+ - name : Lint
30+ run : docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.23.3 golangci-lint run -v ./...
Original file line number Diff line number Diff line change 1+ service :
2+ golangci-lint-version : 1.23.x
3+ prepare :
4+ - go mod tidy
5+ - go generate ./...
6+
7+ linters :
8+ enable-all : true
9+ disable :
10+ # 因为只有两行语句的 case 语句里面强制要求 return 语句换行会让整个 switch 很分裂。
11+ - wsl
12+ # 因为连 1 都算 magic number 的话,许多循环就没法写了。
13+ # https://github.com/tommy-muehle/go-mnd/issues/3
14+ - gomnd
15+ # 有些情况下错误不可避免:
16+ # https://github.com/alexkohler/dogsled/issues/2
17+ - dogsled
18+ # V1.0 之前有 TODO/FIXME 很正常吧。
19+ - godox
20+ # 有些情况下错误不可避免:
21+ # https://github.com/mvdan/unparam/issues/43
22+ - unparam
23+ # 下面这两个 checker 太过激进,并不认同
24+ - gochecknoglobals
25+ - gochecknoinits
26+
27+ linters-settings :
28+ errcheck :
29+ check-type-assertions : true
30+ ignore : ' [FS]?[Pp]rint(|f|ln)|Write'
Original file line number Diff line number Diff line change 1616</a >
1717<a href =" https://github.com/mudclient/go-mud/actions?workflow=Build " >
1818<img alt =" Build workflow " src =" https://github.com/mudclient/go-mud/workflows/Build/badge.svg " >
19+ </a >
20+ <a href =" https://goreportcard.com/report/github.com/mudclient/go-mud " >
21+ <img alt =" Go Report " src =" https://goreportcard.com/badge/github.com/mudclient/go-mud " >
22+ </a >
23+ <a href =" https://golangci.com/r/github.com/mudclient/go-mud " >
24+ <img alt =" GolangCI Report " src =" https://github.com/golangci/golangci-web/blob/master/src/assets/images/badge_a_plus_flat.svg " >
1925</a >
2026 </p>
2127</p >
You can’t perform that action at this time.
0 commit comments