Skip to content
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

chore: use the new github actions reporter for pylint #427

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading