Skip to content

Commit

Permalink
chore: use the new github actions reporter for pylint (#427)
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed May 14, 2024
1 parent a920e61 commit 3b57bfd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 43 deletions.
6 changes: 2 additions & 4 deletions docs/pages/guides/gha_basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,8 @@ for a plugin to do this with pytest.

You can also do this
[by supplying matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md),
which tell GitHub to look for certain patterns, such as
`echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json"`. Do keep
in mind you can only see up to 10 matches per type per step, and a total of 50
matchers.
which tell GitHub to look for certain patterns. Do keep in mind you can only see
up to 10 matches per type per step, and a total of 50 matchers.

### Common useful actions

Expand Down
7 changes: 4 additions & 3 deletions docs/pages/guides/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -862,12 +862,13 @@ And a noxfile entry:
@nox.session
def pylint(session: nox.Session) -> None:
session.install("-e.")
session.install("pylint")
session.install("pylint>=3.2")
session.run("pylint", "<your package>", *session.posargs)
```
And you can add this to your GitHub Actions using `run: pipx run nox -s pylint`.
You can replace `src` with the module name.
And you can add this to your GitHub Actions using
`run: pipx run nox -s pylint -- --output-format=github`. You can replace
`<your package>` with the module name.
## Jupyter notebook support
Expand Down
32 changes: 0 additions & 32 deletions {{cookiecutter.project_name}}/.github/matchers/pylint.json

This file was deleted.

4 changes: 1 addition & 3 deletions {{cookiecutter.project_name}}/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ jobs:
with:
extra_args: --hook-stage manual --all-files
- name: Run PyLint
run: |
echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json"
pipx run nox -s pylint
run: pipx run nox -s pylint -- --output-format=github

checks:
name: {% raw %}Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}{% endraw %}
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_name}}/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def pylint(session: nox.Session) -> None:
"""
# This needs to be installed into the package environment, and is slower
# than a pre-commit check
session.install(".", "pylint")
session.install(".", "pylint>=3.2")
session.run("pylint", "{{ cookiecutter.__project_slug }}", *session.posargs)


Expand Down

0 comments on commit 3b57bfd

Please sign in to comment.