-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 some linting issues #2628
fix some linting issues #2628
Conversation
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@@ -277,6 +277,7 @@ func RemovePaths(paths map[string]string) (err error) { | |||
} | |||
} | |||
if len(paths) == 0 { | |||
//nolint:ineffassign // done to help garbage collecting: opencontainers/runc#2506 |
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.
Looks like it at least finds them 😂 had a typo here;
level=warning msg="[runner/nolint] Found unknown linters in //nolint directives: ineffasign"
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 we change the function to return a separate map?
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 we change the function to return a separate map?
I don't think this makes any sense. No caller of RemovePaths is interested in this map; it is cleaned here in place only to help garbage collector.
If you don't like it we can just drop the paths = make(map[string]string)
line, but I think it makes sense to keep 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.
LGTM
mostly a test to see if golang-ci-lint picks up these changes in CI as well (not sure if the "nolint" tags work everywhere; they can be somewhat hit and miss