-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Fix undocumented golint errors #69269
Fix undocumented golint errors #69269
Conversation
/ok-to-test |
It seems this PR interferes with the code generation. Any idea why? Is it possible to fix or should this just be discarded, as the golint violation is about comments? @dims |
forgot about this, if this is generated things, then we will have to change this somewhere else . @kubernetes/api-reviewers might have some hints |
/assign @logicalhan |
@jennybuckley: GitHub didn't allow me to assign the following users: logicalhan. Note that only kubernetes members and repo collaborators can be assigned. In response to this:
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. |
I may be mistaken, but I believe that these files are actually code-generated, which means any lint errors you may be encountering will be reintroduced if these files are regenerated. It is probably desirable to fix string which is used to generate this code (i.e. |
Oh, I just saw your comment. Yes, I believe that these files are code-generated, so it is probably prudent to resolve this at the source and re-generate the files in order to fix the lint error. |
I've looked into this and it seems that these files should be automatically excluded from lint since they are flagged as being code-generated. Would mind running |
I found them initially by running |
I'll be doing this now. I hope it can fit in this PR in a clear history way, otherwise I'll close this and open a new one for that. |
610e27f
to
d7d6205
Compare
d7d6205
to
a198790
Compare
/kind cleanup |
@@ -76,6 +76,7 @@ func (g *factoryInterfaceGenerator) GenerateType(c *generator.Context, t *types. | |||
} | |||
|
|||
var externalSharedInformerFactoryInterface = ` | |||
// NewInformerFunc is a function returning a SharedIndexInformer |
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.
Nit: probably not worth changing, but next time think about customizing the comment for the type. (and ending with a period ;) )
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.
codegen has to be updated for tests to pass, so I'll solve the nit as well. Should I rebase or add them as new commits?
/lgtm |
/retest Review the full test history for this PR. Silence the bot with an |
2 similar comments
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
a198790
to
029207a
Compare
Addressed the nits and rebased on master (was failing verification due to new code-generated files). Added them as new commits, but open to squash them in 2 or 1 commit, as needed. |
@lavalamp ☝️ |
Edit: I see we are already fixing this in the code gen. I'm happy with this as is if others are. |
...lient/informers/informers_generated/internalversion/internalinterfaces/factory_interfaces.go
Outdated
Show resolved
Hide resolved
029207a
to
9d98412
Compare
@mikedanese @lavalamp Nits addressed and commits squashed. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lavalamp, miguelbernadi, mikedanese 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 |
@@ -35,4 +36,5 @@ type SharedInformerFactory interface { | |||
InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer | |||
} | |||
|
|||
// TweakListOptionsFunc is a function that applies a transform on v1.ListOptions. |
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.
Gah I wrote my comment late at night. "is a function that applies a tranformation to a"? "is a function that transforms a"?
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.
language corrected.
9d98412
to
acf78cd
Compare
Thanks! /lgtm |
/retest |
What this PR does / why we need it:
Fixes some golint errors due to missing comment descriptions. These were reported by running
hack/verify-golint.sh
directly, as they were not present inhack/.golint_failures
.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Related to #68026
Special notes for your reviewer:
Release note: