-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(lint): switch to enable-all linters config (#2)
- Loading branch information
1 parent
229930c
commit 40c5213
Showing
2 changed files
with
103 additions
and
74 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,74 @@ | ||
run: | ||
allow-parallel-runners: true | ||
|
||
issues: | ||
exclude: | ||
- "if statements should only be cuddled with assignments" # from wsl | ||
- "if statements should only be cuddled with assignments used in the if statement itself" # from wsl | ||
- "assignments should only be cuddled with other assignments" # from wsl. false positive case: var a bool\nb := true | ||
- "declarations should never be cuddled" # from wsl | ||
# don't skip warning about doc comments | ||
# don't exclude the default set of lint | ||
exclude-use-default: false | ||
# restore some of the defaults | ||
# (fill in the rest as needed) | ||
exclude-rules: | ||
- path: internal/* | ||
linters: | ||
- dupl | ||
linters: | ||
enable-all: true | ||
disable: | ||
- depguard | ||
- exportloopref | ||
- execinquery | ||
- gomnd | ||
- funlen | ||
- containedctx | ||
- exhaustruct | ||
- testpackage | ||
- varnamelen | ||
- maintidx | ||
- err113 | ||
- nlreturn | ||
- wrapcheck | ||
- tagliatelle | ||
- paralleltest | ||
- lll | ||
- contextcheck | ||
- gochecknoglobals | ||
- tagalign | ||
- nilnil | ||
- godot | ||
- godox | ||
- gci | ||
- gocognit | ||
- gocyclo | ||
- cyclop | ||
- ireturn | ||
- gofumpt | ||
- gochecknoinits | ||
|
||
linters-settings: | ||
wsl: | ||
allow-assign-and-call: false | ||
strict-append: false | ||
allow-trailing-comment: true | ||
allow-cuddle-declarations: true | ||
allow-separated-leading-comment: true | ||
revive: | ||
rules: | ||
- name: blank-imports | ||
disabled: true | ||
nestif: | ||
# Minimal complexity of if statements to report. | ||
# Default: 5 | ||
min-complexity: 9 | ||
dupl: | ||
# Tokens count to trigger issue. | ||
# Default: 150 | ||
threshold: 600 | ||
mnd: | ||
ignored-functions: | ||
- "context.WithTimeout" | ||
- "strconv.ParseComplex" | ||
ignored-files: | ||
- "examples/.*" | ||
gocritic: | ||
disabled-checks: | ||
- ifElseChain | ||
gosec: | ||
excludes: | ||
- G115 | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- dupl | ||
- errcheck | ||
- exportloopref | ||
- goconst | ||
- gocyclo | ||
- gofmt | ||
- goimports | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
# - lll | ||
- misspell | ||
- nakedret | ||
- prealloc | ||
- staticcheck | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- containedctx | ||
- durationcheck | ||
- errname | ||
- exhaustive | ||
- forcetypeassert | ||
- goheader | ||
- goprintffuncname | ||
# - gosec | ||
- musttag | ||
- nestif | ||
- nolintlint | ||
- nosprintfhostport | ||
- predeclared | ||
- reassign | ||
- revive | ||
- tenv | ||
- testableexamples | ||
- whitespace | ||
- wsl | ||
issues: | ||
exclude: | ||
- "if statements should only be cuddled with assignments" # from wsl | ||
- "if statements should only be cuddled with assignments used in the if statement itself" # from wsl | ||
- "assignments should only be cuddled with other assignments" # from wsl. false positive case: var a bool\nb := true | ||
exclude-rules: | ||
- path: _test\.go | ||
linters: | ||
- perfsprint |
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