-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from mudclient/style/lint
排版和重构代码,以提升代码质量
- Loading branch information
Showing
10 changed files
with
445 additions
and
410 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
service: | ||
golangci-lint-version: 1.23.x | ||
prepare: | ||
- go mod tidy | ||
- go generate ./... | ||
|
||
linters: | ||
enable-all: true | ||
disable: | ||
# 因为只有两行语句的 case 语句里面强制要求 return 语句换行会让整个 switch 很分裂。 | ||
- wsl | ||
# 因为连 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 | ||
|
||
linters-settings: | ||
errcheck: | ||
check-type-assertions: true | ||
ignore: '[FS]?[Pp]rint(|f|ln)|Write' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.