-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding rules for lint and changes for pass in pipeline (#15)
* Adding rules for lint and changes for pass in pipeline * Fixing Risk Accept and vuln
- Loading branch information
1 parent
b5f2dfd
commit 7bd7ad2
Showing
16 changed files
with
212 additions
and
272 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,122 @@ | ||
linters-settings: | ||
govet: | ||
check-shadowing: true | ||
settings: | ||
printf: | ||
funcs: | ||
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof | ||
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf | ||
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf | ||
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf | ||
golint: | ||
min-confidence: 0.8 | ||
gocyclo: | ||
min-complexity: 5 | ||
maligned: | ||
suggest-new: true | ||
dupl: | ||
threshold: 100 | ||
goconst: | ||
min-len: 2 | ||
min-occurrences: 2 | ||
depguard: | ||
list-type: blacklist | ||
packages: | ||
# logging is allowed only by logutils.Log, logrus | ||
# is allowed to use only in logutils package | ||
- github.com/sirupsen/logrus | ||
packages-with-error-messages: | ||
github.com/sirupsen/logrus: "logging is allowed only by logutils.Log" | ||
misspell: | ||
locale: US | ||
lll: | ||
line-length: 120 | ||
goimports: | ||
local-prefixes: github.com/golangci/golangci-lint | ||
gocritic: | ||
enabled-tags: | ||
- opinionated | ||
- experimental | ||
- diagnostic | ||
- style | ||
- performance | ||
disabled-checks: | ||
- evalOrder | ||
- wrapperFunc | ||
- unnamedResult | ||
- octalLiteral | ||
- dupImport | ||
funlen: | ||
lines: 15 | ||
statements: 10 | ||
|
||
linters: | ||
# please, do not use `enable-all`: it's deprecated and will be removed soon. | ||
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint | ||
disable-all: true | ||
enable: | ||
- dogsled | ||
- deadcode | ||
- depguard | ||
- bodyclose | ||
- funlen | ||
- errcheck | ||
- dupl | ||
- gocritic | ||
- gochecknoinits | ||
- goconst | ||
- gofmt | ||
- gocyclo | ||
- gosec | ||
- golint | ||
- ineffassign | ||
- gosimple | ||
- govet | ||
- lll | ||
- interfacer | ||
- nakedret | ||
- misspell | ||
- staticcheck | ||
- scopelint | ||
- stylecheck | ||
- structcheck | ||
- unconvert | ||
- typecheck | ||
- unused | ||
- unparam | ||
- whitespace | ||
- varcheck | ||
|
||
run: | ||
skip-dirs: | ||
- vendor/ | ||
- tmp | ||
- e2e/ | ||
skip-files: | ||
- .*_test.go | ||
- .*_mock.go | ||
|
||
issues: | ||
exclude-rules: | ||
- path: platforms/finding.go | ||
linters: | ||
- gocritic | ||
- path: platforms/rule.go | ||
linters: | ||
- gocritic | ||
- path: text/file.go | ||
linters: | ||
- gocritic | ||
- path: text/rule.go | ||
linters: | ||
- gocritic | ||
- path: text/unit.go | ||
linters: | ||
- gocritic | ||
|
||
# golangci.com configuration | ||
# https://github.com/golangci/golangci/wiki/Configuration | ||
service: | ||
golangci-lint-version: v1.21.0 # use the fixed version to not introduce new linters unexpectedly | ||
prepare: | ||
- echo "here I can run custom commands, but no preparation needed for this repo" |
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,4 +1,4 @@ | ||
alpha: 0 | ||
beta: 0 | ||
rc: 0 | ||
release: v0.2.7 | ||
release: v0.2.8 |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.