Move linting to GitHub Actions with reviewdog. by QuLogic · Pull Request #17143 · matplotlib/matplotlib · GitHub
Skip to content

Move linting to GitHub Actions with reviewdog.#17143

Merged
timhoffm merged 1 commit into
matplotlib:masterfrom
QuLogic:reviewdog
Apr 18, 2020
Merged

Move linting to GitHub Actions with reviewdog.#17143
timhoffm merged 1 commit into
matplotlib:masterfrom
QuLogic:reviewdog

Conversation

@QuLogic

@QuLogic QuLogic commented Apr 15, 2020

Copy link
Copy Markdown
Member

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 running flake8 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

  • [N/A] Has Pytest style unit tests
  • Code is Flake 8 compliant
  • [N/A] New features are documented, with examples if plot related
  • [N/A] Documentation is sphinx and numpydoc compliant
  • [N/A] Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • [N/A] Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@QuLogic

QuLogic commented Apr 15, 2020

Copy link
Copy Markdown
Member Author

@QuLogic

QuLogic commented Apr 15, 2020

Copy link
Copy Markdown
Member Author

@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.

@tacaswell tacaswell added this to the v3.3.0 milestone Apr 15, 2020
@QuLogic

QuLogic commented Apr 16, 2020

Copy link
Copy Markdown
Member Author

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.

@QuLogic

QuLogic commented Apr 17, 2020

Copy link
Copy Markdown
Member Author

Updated for #17145, and updated docs due to #17040.

@dopplershift

Copy link
Copy Markdown
Contributor

If you're looking for spellchecking in code, you can also look at codespell.

@QuLogic

QuLogic commented Apr 18, 2020

Copy link
Copy Markdown
Member Author

I ran codespell and opened #17184, though there are still several false positives that might impede enabling it on PRs immediately.

@timhoffm

Copy link
Copy Markdown
Member

Is there still something to do on this PR or can it be merged?

@QuLogic

QuLogic commented Apr 18, 2020

Copy link
Copy Markdown
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants