-
Notifications
You must be signed in to change notification settings - Fork 716
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add some linting to gaia - closes #187 Signed-off-by: Marko Baricevic <marbar3778@yahoo.com> * fail tests * tests pass * address PR comments * some more strictness
- Loading branch information
1 parent
1069c5b
commit 967fc43
Showing
15 changed files
with
160 additions
and
81 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,17 +1,61 @@ | ||
linters: | ||
disable-all: true | ||
enable: | ||
- bodyclose | ||
- deadcode | ||
- depguard | ||
- dogsled | ||
- errcheck | ||
- goconst | ||
- gocritic | ||
- gofmt | ||
- goimports | ||
- golint | ||
- gosec | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- unconvert | ||
- interfacer | ||
- misspell | ||
- maligned | ||
- nakedret | ||
- prealloc | ||
- scopelint | ||
- staticcheck | ||
- structcheck | ||
- stylecheck | ||
- typecheck | ||
- unconvert | ||
- unused | ||
- varcheck | ||
|
||
issues: | ||
exclude-rules: | ||
- text: "Use of weak random number generator" | ||
linters: | ||
- gosec | ||
- text: "ST1003:" | ||
linters: | ||
- stylecheck | ||
|
||
linters-settings: | ||
gocyclo: | ||
min-complexity: 11 | ||
dogsled: | ||
max-blank-identifiers: 3 | ||
maligned: | ||
# print struct with more effective memory layout or not, false by default | ||
suggest-new: true | ||
errcheck: | ||
ignore: fmt:.*,io/ioutil:^Read.*,github.com/spf13/cobra:MarkFlagRequired,github.com/spf13/viper:BindPFlag | ||
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; | ||
# default is false: such cases aren't reported by default. | ||
check-blank: true | ||
golint: | ||
min-confidence: 1.1 | ||
run: | ||
tests: false | ||
# minimal confidence for issues, default is 0.8 | ||
min-confidence: 0 | ||
prealloc: | ||
# XXX: we don't recommend using this linter before doing performance profiling. | ||
# For most programs usage of prealloc will be a premature optimization. | ||
|
||
# Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them. | ||
# True by default. | ||
simple: false | ||
range-loops: true # Report preallocation suggestions on range loops, true by default | ||
for-loops: true # Report preallocation suggestions on for loops, false by default |
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
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.