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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable golangci-lint and fix issues #3023
Merged
Merged
Conversation
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
stephenfin
force-pushed
the
golangci-lint
branch
from
April 4, 2024 14:05
771420e
to
0e0c893
Compare
github-actions
bot
added
semver:patch
No API change
and removed
semver:patch
No API change
labels
Apr 4, 2024
stephenfin
force-pushed
the
golangci-lint
branch
from
April 15, 2024 14:58
0e0c893
to
726cc62
Compare
github-actions
bot
added
semver:patch
No API change
and removed
semver:patch
No API change
labels
Apr 15, 2024
stephenfin
force-pushed
the
golangci-lint
branch
from
April 15, 2024 15:00
726cc62
to
386e5a4
Compare
github-actions
bot
added
semver:patch
No API change
and removed
semver:patch
No API change
labels
Apr 15, 2024
stephenfin
force-pushed
the
golangci-lint
branch
from
April 17, 2024 16:14
386e5a4
to
ba085d5
Compare
stephenfin
force-pushed
the
golangci-lint
branch
from
April 17, 2024 16:15
ba085d5
to
872e9f1
Compare
github-actions
bot
added
semver:patch
No API change
and removed
semver:patch
No API change
labels
Apr 17, 2024
github-actions
bot
added
semver:patch
No API change
and removed
semver:patch
No API change
labels
May 15, 2024
Plus a note for Fedora users. All current failures are ignored while we work on fixing them. Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This resolves remaining issues with the gosimple linter. Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We ignore the two warnings since (a) string.Title is perfectly fine for our use case here, and (b) x509.EncryptPEMBlock is only used in tests. Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Fix in the one go. We can remove the separate 'go vet' and 'go fmt' invocations since these are now run by golangci-lint Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
github-actions
bot
added
semver:patch
No API change
and removed
semver:patch
No API change
labels
May 20, 2024
EmilienM
approved these changes
May 22, 2024
huge work. Thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR comes out of comments from @EmilienM in #2940 and depends on same. Add
golangci-lint
to thelint
target added by that PR. Most of the changes are noddy and don't really benefit us massively, but fixing them is easier than ignoring them on a file-by-file basis 馃槃.Commits
Add minimal Makefile
make: Add golangci-lint to lint target
lint: Remove redundant returns (gosimple)
lint: Remove unnecessary guards around calls to delete (gosimple)
lint: Remove unnecessary assignments to the blank identifier (gosimple)
lint: Remove unused variables (unused)
lint: Check all return codes (errcheck)
lint: Resolve ineffectual assignments to err (ineffassign)
lint: Simplify various bits of code (gosimple)
lint: Remove unused variables (staticcheck)
lint: Resolve nil pointer dereference (staticcheck)
lint: Use strings.Equalfold (staticcheck)
lint: Replace use of deprecated stdlib functions (staticcheck)
lint: Enable additional linters
Depends-On: #2940