This repository was archived by the owner on Jan 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
Add golangci-lint and fixup flagged issues #116
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
94d678a
Configure linter
stuartleeks 0686ee1
Initial work to address linter feedback
stuartleeks 5664e83
Continue on linter issues
stuartleeks e48db5f
remove unused code
stuartleeks 1dcbca2
Merge branch 'master' into sl/add-linting
stuartleeks d537976
fmt
stuartleeks 67c69ca
Convert golangci-lint config to yaml
stuartleeks 6542be4
Rename checks to lint
stuartleeks 2865b69
re-add vet as per PR review comments
stuartleeks 8ed13f6
install golangci-lint in pipeline
stuartleeks 466cdee
update crd yaml
stuartleeks 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 hidden or 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 hidden or 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,44 @@ | ||
| run: | ||
| deadline: 5m | ||
| skip-files: [] | ||
|
|
||
| linters-settings: | ||
| linters-settings.govet: | ||
| check-shadowing: true | ||
|
|
||
| linters-settings.gocyclo: | ||
| min-complexity: 12.0 | ||
|
|
||
| linters-settings.maligned: | ||
| suggest-new: true | ||
|
|
||
| linters-settings.goconst: | ||
| min-len: 3.0 | ||
| min-occurrences: 3.0 | ||
|
|
||
| linters-settings.misspell: | ||
| locale: "US" | ||
| ignore-words: | ||
| - listend | ||
| - analyses | ||
| - cancelling | ||
|
|
||
| linters: | ||
| enable: | ||
| - vet | ||
| - golint | ||
| - gofmt | ||
| - deadcode | ||
| - varcheck | ||
| - structcheck | ||
| - misspell | ||
| - errcheck | ||
| - gosimple | ||
| - govet | ||
| - ineffassign | ||
|
|
||
| issues: | ||
| exclude-use-default: false | ||
| max-per-linter: 0 | ||
| max-same-issues: 0 | ||
| exclude: [] |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
what was the reason of changing
go fmt ./...tofind . -name '*.go' | grep -v vendor | xargs gofmt -s -w?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.
the golangci-lint checks that the code has been simplified and I reused the fmt command from other projects to apply the simplification and to ignore vendored packages (avoids linter failures on those if vendoring is ever used)