-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
protokube/pkg - fix static check #8165
Conversation
Hi @hakman. Thanks for your PR. I'm waiting for a kubernetes 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. |
/cc @rifelpet |
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.
@hakman Thanks for cc
mustRemove = false | ||
return nil | ||
} | ||
//func atomicWriteFile(filename string, data []byte, perm os.FileMode) error { |
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.
atomicWriteFile can remove not comment?
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.
Looked like someone did some work to create it. Maybe someone needs it for something at some point in time.
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.
sure i get it
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.
Decided you were right. It's Git, anyone can go back to a version that had the function and copy it.
/ok-to-test |
7baa93c
to
a1ec68a
Compare
/test pull-kops-e2e-kubernetes-aws |
a1ec68a
to
6082488
Compare
protokube/pkg/gossip/mesh/mesh.pb.go
Outdated
@@ -170,6 +170,7 @@ func (m *KVStateRecord) MarshalTo(data []byte) (int, error) { | |||
return i, nil | |||
} | |||
|
|||
//lint:ignore U1000 - Generated by protoc-gen-gogo from mesh.proto |
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'm not sure we can add comments to this file, wont they get wiped the next time we regenerate the file? Maybe theres a setting in the generation that we can add, or maybe we'll need to permanently exclude this file from staticcheck. It might be possible to configure the generator to add a single file exclusion comment
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.
Nice catch with the file exclusion.
The file has been generated almost 3 years ago and there are already some comments like the copyright. If it's ever regenerated, the static check should catch this again.
9ad7cbc
to
19b4e5d
Compare
19b4e5d
to
defcbe8
Compare
/test pull-kops-verify-staticcheck |
/assign @chrisz100 |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chrisz100, hakman 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 |
Ref: #7800
Errors from staticcheck: