Skip to content

Commit 2a081cd

Browse files
authored
Define separate pre-commit job for pylint ci runs (#2794)
1 parent f9e109e commit 2a081cd

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
- name: Run pre-commit checks
7373
run: |
7474
. venv/bin/activate
75-
pre-commit run pylint --all-files
75+
pre-commit run --hook-stage manual pylint-ci --all-files
7676
7777
tests-linux:
7878
name: tests / run / ${{ matrix.python-version }} / Linux

.pre-commit-config.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,20 @@ repos:
4141
- repo: local
4242
hooks:
4343
- id: pylint
44+
name: pylint
45+
entry: pylint
46+
language: system
47+
types: [python]
48+
args: [
49+
"-rn",
50+
"-sn",
51+
"--rcfile=pylintrc",
52+
# "--load-plugins=pylint.extensions.docparams", We're not ready for that
53+
]
54+
# We define an additional manual step to allow running pylint
55+
# with the proper output for CI.
56+
- id: pylint
57+
alias: pylint-ci
4458
name: pylint
4559
entry: pylint
4660
language: system
@@ -52,6 +66,7 @@ repos:
5266
"--output-format=github",
5367
# "--load-plugins=pylint.extensions.docparams", We're not ready for that
5468
]
69+
stages: [manual]
5570
- repo: https://github.com/pre-commit/mirrors-mypy
5671
rev: v1.17.1
5772
hooks:

0 commit comments

Comments
 (0)