-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Move linting to GitHub Actions with reviewdog. #17143
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
Conversation
So it doesn't post here because the token is for the PR repo and not this repo. I'm not sure if that will fix itself once merged. Considering also adding cppcheck and eslint, but there's a bug in reviewdog preventing the latter. We could also add some things like misspell or languagetool, but I'm not sure if we want to (hard to say for technical things how useful spell-check is.) |
@tacaswell ran a test PR for me here: QuLogic#5 Unfortunately, PRs don't get writable tokens for Checks API, so it won't post its separate Check with the annotation like in my test. That's a bit disappointing, but at least it's not hidden inside Travis checks now. There are a couple of other token/review options that I will check, but if none is better, I'll rename some of the stages to make it more obvious what to look at on error. |
Ah wait, I'm totally blind. The fallback annotations do show up; they just aren't on the sub-job, but the top-level "Linting" section. |
If you're looking for spellchecking in code, you can also look at codespell. |
I ran codespell and opened #17184, though there are still several false positives that might impede enabling it on PRs immediately. |
Is there still something to do on this PR or can it be merged? |
It can be merged; that's why it's no longer draft. |
PR Summary
This moves
flake8
from Travis to GitHub Actions using reviewdog to post it to the GitHub Checks. It runs a bit faster now (basically all time is runningflake8
vs ~0 install time) at ~1m vs ~5.5m on Travis.Linting will appear as a section separate from Travis now in the Checks section of the PR, but I could switch the config to post a review.
Here is the PR I'm using to test out the results.
PR Checklist