-
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
Review and address golang-ci linting errors #2627
Comments
Interestingly, the output doesn't show the file location where errors occurred; is there a different location where logs can be viewed with more details? |
Looks like this is a starting point, but haven't found yet how to see annotations on the correct lines; https://github.com/opencontainers/runc/actions?query=workflow%3Agolangci-lint |
Quick try to see how the linter picks up changes in PR's #2628 |
I think we can just disable linter for master and call it a day |
Why disable? I think there's various issues it picked up that could be actual things to look for. (not all of them, but there are some that could improve code quality at least) |
Hi everyone. I go for it. |
Addressed by #2694, #2695, #2696. What's left is #2699, google protobuf issue (checkpoint-restore/go-criu#36), and a bunch of errcheck warnings. |
CI has been failing for merge commits into master: https://github.com/opencontainers/runc/runs/1802320146 Do we want to make this green before rc93? I think we can just add |
opened #2779 to fix the "deadcode" linting. Build is currently broken on master (also #2778); I can have a look after that to see what's remaining. If it's only the |
Do we know why the linter doesn't print file/line numbers for the failures? Current output in GH actions isn't very useful currently 🤔 |
I would prefer |
Working on a branch to fix (at least some) of the failures (there's probably quite a lot, so may split it in a couple of PR's to spread the work a bit) |
@thaJeztah make sure to pick up #2696
Github annotations are used where possible (i.e. in PRs). I thought it works on master, too, but apparently annotations are just for diffs. See also golangci/golangci-lint-action#119 |
I tried rebasing my branch on top of that one, and it rebased cleanly, so I based it on master again; thanks for the heads up 👍 |
We can't make it entirely green; as per my earlier comment
I would not address any of that before rc93 -- the first two are too major and would definitely delay rc93 further than we want to, and the last one (errcheck) is too trivial (so I'd rather have it right after rc93, not before). |
Yeah I wouldn't block rc93 on this. If cleanups get in before we merge everything else, great. If not, it can make it next release. |
Note that validate currently fails on master -- this is tracked in opencontainers#2627. Signed-off-by: Kir Kolyshkin <[email protected]>
Should be fixed by checkpoint-restore/go-criu#43, and once it's in we'll just bump protobuf to 1.4.x |
Note that validate currently fails on master -- this is tracked in opencontainers#2627. Signed-off-by: Kir Kolyshkin <[email protected]>
The rest of it can wait until post-rc94 I think |
#2781 is still pending, and fixes a bunch of them |
We recently added golang-ci-lint, which runs on pull requests and on master.
Currently, looks like the linter on PR's only checks the changed lines, but found various issues in the existing code on master (see #2618 (comment)); the linter picked up the problem in https://github.com/opencontainers/runc/runs/1190924966
Looks like that output is a good list of things to work on;
Some notes there;
errcheck
, or configure a rule/regex for error-handling we think is acceptable to ignoreThere's also some false positives #2625 (comment)
w.r.t Windows: it may be only checking for the platform it runs on. IIRC, there's also an option to specify which build tags to use when linting. (so multiple combinations of build-tags could be needed to lint everything).
#2625 (comment)
Action items:
The text was updated successfully, but these errors were encountered: