-
Notifications
You must be signed in to change notification settings - Fork 603
Issue 2428: Enforce comments on the codebase #2443
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
Conversation
Welcome @Algebra8! |
Hi @Algebra8. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Here is the WIP of #2428 Some things to note:
I look forward to hearing any feedback 😄 Thanks! |
/ok-to-test |
Question:
Somethings worth noting:
|
It seems like the pipeline for
I was under the impression that Revive is offered out of the box with |
@Algebra8 - yes please. |
0bd76d3
to
6d92fcb
Compare
With regards to I think the two most obvious solutions to this issue are 1_ Update Another option may be to externally install revive but I'm not at this moment sure of how or if that would work. Any suggestions? |
A few notes on recent commits: The following commits are related to removing linter warnings: An important one to note is Finally, commit 2083cfd should resolve the breaking pipeline for @sedefsavas |
Following the instructions of the Apologies for the large PR, but I was told beforehand that this PR was expected to be big. However, I included some things that might fall out of the domain of the PR (please see #2443 (comment)). I would be more than happy to roll back the commit history and open up separate PRs if it was a mistake to include them (I included them because I assumed I look forward to your feedback and will assign you to this PR (as per the requests of /assign @CecileRobertMichon |
/unassign |
.golangci.yml
Outdated
# TODO(algebra8): Find solution to line below or remove if not needed. | ||
# - Using the variable on range scope `(tc)|(rt)|(tt)|(test)|(testcase)|(testCase)` in function literal |
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.
Can these be removed?
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.
I forgot about that commented out line, thank you for bringing that to my attention.
I will set the PR as WIP again and try to figure out what that line did. As far as I can tell, that line was casting a wide net of linter exclusions - which I assumed was not desired. However, since all linters are passing now it should be ok to remove.
Minor comment otherwise lgtm /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sedefsavas The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
dc0d6c7
to
888d25d
Compare
The following linter errors were resolved to fix any pipeline issues: * Resolve goimports errors * Resolve deadcode errors by removing unused code * Resolve misspell error by correcting spelling * Resolve staticcheck errors * Staticcheck linter was complaining about fmt.Printf being used with dynamic first argument and no other arguments (SA1006). This can lead to unexpected output. To solve this fmt.Printf was switched with fmt.Println. Also, pkg/cloudtest/cloudtest.go V(level int) returned a logr.InfoLogger which is deprecated, which Staticcheck complained about. This was swapped with the newer logr.Logger. * Exclude noctx error with descriptive comments * Resolve gosimple errors Since comments were updated, yamls had to be regenerated using `make regenerate`: * Generate yamls from changed comments using make generate Also, the golangci exclude line "Using the variable on range scope `(tc)|(rt)|(tt)| (test)|(testcase)|(testCase)` in function literal" was removed because it was blocking what seemed to be a larger net of linters than it was supposed to and because after the linter issues were resolved it became redundant.
Thanks @Algebra8 |
What type of PR is this?
/kind support
What this PR does / why we need it:
This PR enforces comments on the codebase via
revive
.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #2428
Special notes for your reviewer:
Checklist:
Release note: