This repository was archived by the owner on Nov 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: refine build and lint (#1584)
- Loading branch information
Showing
314 changed files
with
3,532 additions
and
2,617 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,123 @@ | ||
linters: | ||
disable-all: true | ||
enable: | ||
- asciicheck | ||
- bodyclose | ||
- deadcode | ||
- depguard | ||
- dogsled | ||
- dupl | ||
- errcheck | ||
- exportloopref | ||
- gocritic | ||
- godot | ||
- golint | ||
- goprintffuncname | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- misspell | ||
- nakedret | ||
- noctx | ||
- nolintlint | ||
- prealloc | ||
- revive | ||
- rowserrcheck | ||
- staticcheck | ||
- structcheck | ||
- stylecheck | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- varcheck | ||
- whitespace | ||
- durationcheck | ||
- gofumpt | ||
- goheader | ||
- gomodguard | ||
- ifshort | ||
- importas | ||
- makezero | ||
- nilerr | ||
- predeclared | ||
- sqlclosecheck | ||
- thelper | ||
- tparallel | ||
- wastedassign | ||
|
||
# don't enable: | ||
# - testpackage | ||
# - lll | ||
# - wsl | ||
# - gochecknoglobals | ||
# - godox | ||
# - gomnd | ||
# - goerr113 | ||
# - exhaustive | ||
# - wrapcheck | ||
# - nlreturn | ||
# - exhaustivestruct | ||
# - errorlint | ||
# - forcetypeassert | ||
# - paralleltest | ||
# - forbidigo | ||
# - gosec | ||
# - goconst | ||
# - interfacer | ||
# - scopelint | ||
|
||
# already cover: | ||
# - gci | ||
# - goimports | ||
# - gofmt | ||
|
||
# better to fix them | ||
# - funlen | ||
# - gocognit | ||
# - nestif | ||
# - gocyclo | ||
# - cyclop | ||
# - gomoddirectives | ||
# - gochecknoinits | ||
# - maligned | ||
|
||
linters-settings: | ||
govet: | ||
# report about shadowed variables | ||
check-shadowing: true | ||
revive: | ||
ignoreGeneratedHeader: false | ||
severity: "error" | ||
confidence: 0.8 | ||
errorCode: -1 | ||
warningCode: -1 | ||
rules: | ||
- name: blank-imports | ||
- name: context-as-argument | ||
- name: dot-imports | ||
- name: error-return | ||
- name: error-strings | ||
- name: error-naming | ||
- name: exported | ||
- name: if-return | ||
- name: var-naming | ||
- name: package-comments | ||
- name: range | ||
- name: receiver-naming | ||
- name: indent-error-flow | ||
- name: superfluous-else | ||
- name: modifies-parameter | ||
- name: unreachable-code | ||
|
||
issues: | ||
include: | ||
- EXC0002 # golint | ||
- EXC0003 | ||
|
||
# Fix found issues (if it's supported by the linter) | ||
fix: true | ||
|
||
run: | ||
# timeout for analysis, e.g. 30s, 5m, default is 1m | ||
timeout: 5m |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.