-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: use golangci-lint CLI to lint files (#80)
## Description This PR updates the linting process to use the `golangci-lint` CLI. This should guarantee major forward compatibility as the golangci-lint version is now tracked within the codebase along with other dependencies Depends-On: #79 ## Checklist - [x] Targeted PR against correct branch. - [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. - [ ] Wrote unit tests. - [x] Re-reviewed `Files changed` in the Github PR explorer.
- Loading branch information
Showing
21 changed files
with
742 additions
and
352 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
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,22 +1,72 @@ | ||
run: | ||
tests: false | ||
# # timeout for analysis, e.g. 30s, 5m, default is 1m | ||
# timeout: 5m | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- errcheck | ||
- bodyclose | ||
- deadcode | ||
- depguard | ||
- dogsled | ||
- gocritic | ||
- gofmt | ||
- goimports | ||
- golint | ||
- gosec | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- maligned | ||
- misspell | ||
- nakedret | ||
- scopelint | ||
- staticcheck | ||
- structcheck | ||
- stylecheck | ||
- typecheck | ||
- unconvert | ||
- unused | ||
- unparam | ||
- misspell | ||
- govet | ||
- gocyclo | ||
linters-settings: | ||
gocyclo: | ||
min-complexity: 11 | ||
errcheck: | ||
ignore: fmt:.*,io/ioutil:^Read.*,github.com/spf13/viper:BindPFlag | ||
golint: | ||
min-confidence: 1.1 | ||
- nolintlint | ||
|
||
issues: | ||
exclude: | ||
- composite | ||
run: | ||
tests: false | ||
exclude-rules: | ||
- text: "Use of weak random number generator" | ||
linters: | ||
- gosec | ||
- text: "comment on exported var" | ||
linters: | ||
- golint | ||
- text: "don't use an underscore in package name" | ||
linters: | ||
- golint | ||
- text: "ST1003:" | ||
linters: | ||
- stylecheck | ||
# FIXME: Disabled until golangci-lint updates stylecheck with this fix: | ||
# https://github.com/dominikh/go-tools/issues/389 | ||
- text: "ST1016:" | ||
linters: | ||
- stylecheck | ||
|
||
- text: "singleCaseSwitch: should rewrite switch statement to if statement" | ||
linters: | ||
- gocritic | ||
|
||
max-issues-per-linter: 10000 | ||
max-same-issues: 10000 | ||
|
||
linters-settings: | ||
dogsled: | ||
max-blank-identifiers: 3 | ||
maligned: | ||
# print struct with more effective memory layout or not, false by default | ||
suggest-new: true | ||
nolintlint: | ||
allow-unused: false | ||
allow-leading-space: true | ||
require-explanation: false | ||
require-specific: false |
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
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
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
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
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.