-
Notifications
You must be signed in to change notification settings - Fork 9
Add problem matchers to highlight errors in Github PRs code diff #376
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
79e18c9 to
0cda4e1
Compare
0cda4e1 to
87ba9ee
Compare
LeoDiazL
left a comment
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
| ~/.cache/pip | ||
| .tox | ||
| key: ${{ runner.os }}-v1-python-3.8-${{ hashFiles('requirements.txt', 'test-requirements.txt', 'pyproject.toml', 'tox.ini') }} | ||
| key: ${{ runner.os }}-v1-python-3.8-black-${{ hashFiles('test-requirements.txt', 'pyproject.toml', 'tox.ini') }} |
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.
test-requirements.txt -> requirements.txt
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.
No that's as expected. back depends only on the test-requirements.txt, - that's where we define it as a test/dev dependency.
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.
pylint (below) also needs requirements.txt as it does more in-depth code analysis for the project, including its pip dependencies.
scripts/plugins/install_plugins.py
Outdated
| import os | ||
| import git | ||
| import yaml | ||
| import non_existent_module |
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.
Is this just to illustrate that the UI formatting works?
Either way this should be removed before merge
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.
Right, that's for illustration for you folks to get an idea of how it looks like in the PR code diff.
Will remove it before merging and also plan to squash all the commits as there's a lot of commit noise in this PR.
Based on the previous PRs, sometimes the linting error messages are not clear enough.
Add problem matches to Github Actions so we can highlight the warnings and errors directly in the PR code diff for specific
file:linefrompylintandblackCI runs.See: https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers
See: https://github.com/actions/toolkit/blob/master/docs/problem-matchers.md
The Result
Pylint:

Black:

So there's no need to go into the GH Action Details URL, as the result is just ^^ there.
This PR also splits

blackvspylintin the GH Actions so the failure is more clear: