Skip to content
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

Merged
merged 1 commit into from
Oct 6, 2020
Merged

Conversation

thaJeztah
Copy link
Member

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

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
Copy link
Member Author

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"

Copy link
Member

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?

Copy link
Contributor

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.

Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AkihiroSuda AkihiroSuda merged commit bb539a9 into opencontainers:master Oct 6, 2020
@thaJeztah thaJeztah deleted the linting_foo branch October 6, 2020 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants