-
Notifications
You must be signed in to change notification settings - Fork 18
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
support annotations instead of pr comments / reviews #36
Comments
Agreed! Lintly supports a flag called |
Ah oke, I didn't know that was tied to the Checks API. I will try with a modified version of the lintly-flake8 action. |
Do you think it would be a useful default to use the Checks API if Lintly runs from GitHub Actions? With the ability to override if someone prefers PR reviews. |
For me that would be a better default yes |
I've tried enabling
Here is an example: spinalcordtoolbox/spinalcordtoolbox@353d15a. As a result, the annotations are not visible in the PR files page. My GH Actions workflow config is the following: name: Python Linting (lintly + flake8)
on: [pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: pip install flake8 lintly==0.5.0
- name: Lint with flake8
run: flake8 | lintly --use-checks --fail-on new --exit-zero --no-post-status
env:
LINTLY_API_KEY: ${{ secrets.GITHUB_TOKEN }} SolutionI was able to fix this by manually specifying a different commit SHA. I learned which commit SHA to use by looking at the source code for run: flake8 | lintly --use-checks --fail-on new --exit-zero --no-post-status --commit-sha ${{ github.event.pull_request.head.sha }} After this change, the annotation properly shows up in correct commit, and in the Files dialog: https://github.com/neuropoly/spinalcordtoolbox/pull/3213/files I'm mentioning this here for anyone reading in the future, or in the hopes that this fix could be applied upstream. (Thank you for developing this lovely tool!) |
…lintly-version Sec 1580 change Lintly version
Great tooling, but personally I find it more useful to have the violations reported as annotations on the "Files Changed" tab. Having them as comments in the PR itself (or a review) clutters the PR.
Example:
The text was updated successfully, but these errors were encountered: