-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add linter check support #679
Merged
Merged
Changes from 12 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
7e60fcd
add linter supports
rahul2393 5815438
add only minor version
rahul2393 4542dbc
use latest version
rahul2393 abca649
Fix println with format issue
rahul2393 3a2612c
Fix test
rahul2393 24a09ae
Fix tests
rahul2393 179851c
For slice with unknown length, preallocating the array
rahul2393 4797359
fix code-coverage
rahul2393 292f2ed
Removed linter rules
rahul2393 c5294cd
Reverting linter fixes, adding TODO for later
rahul2393 02a78c2
Ignore linter error for import
rahul2393 4f27b60
Remove another err var.
rahul2393 2fd520d
Ignore shadow error
rahul2393 0557627
Fixes
rahul2393 f5c4858
Fix issue
rahul2393 b6e2b23
Add back goimports local-prefixes
rahul2393 ab29542
Update local prefixes
rahul2393 bfea540
Removed extra spaces and merge the imports
rahul2393 afc83a0
more refactoring
rahul2393 eec01fb
Update photon.go
knqyf263 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,71 @@ | ||
linters-settings: | ||
errcheck: | ||
check-type-assertions: true | ||
check-blank: true | ||
govet: | ||
check-shadowing: true | ||
gofmt: | ||
simplify: false | ||
golint: | ||
min-confidence: 0 | ||
gocyclo: | ||
min-complexity: 10 | ||
maligned: | ||
suggest-new: true | ||
dupl: | ||
threshold: 100 | ||
goconst: | ||
min-len: 3 | ||
min-occurrences: 3 | ||
misspell: | ||
locale: US | ||
goimports: | ||
local-prefixes: github.com/rahul23/trivy | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- structcheck | ||
- ineffassign | ||
- typecheck | ||
- govet | ||
- errcheck | ||
knqyf263 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- varcheck | ||
- deadcode | ||
- golint | ||
- gosec | ||
- unconvert | ||
- goconst | ||
- gocyclo | ||
- gofmt | ||
- goimports | ||
- maligned | ||
- misspell | ||
|
||
run: | ||
skip-files: | ||
- ".*._mock.go$" | ||
- ".*._test.go$" | ||
- "integration/*" | ||
|
||
issues: | ||
exclude-rules: | ||
- linters: | ||
- gosec | ||
text: "G304: Potential file inclusion" | ||
- linters: | ||
- gosec | ||
text: "Deferring unsafe method" | ||
- linters: | ||
- errcheck | ||
text: "Close` is not checked" | ||
- linters: | ||
- errcheck | ||
text: "os.*` is not checked" | ||
- linters: | ||
- golint | ||
text: "a blank import should be only in a main or test package" | ||
exclude: | ||
- "should have a package comment, unless it's in another file for this package" | ||
exclude-use-default: false | ||
max-same-issues: 0 |
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
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was for running the linter check in workflow here, reverted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted to rahul2393?