ci(lint): add ruff and shellcheck hooks
Add ruff-check and ruff-format from astral-sh/ruff-pre-commit and shellcheck from shellcheck-py, with ruff.toml at ruff's defaults plus C901, PLR0912 and PLR0915 (#112). ruff.toml is repository tooling, so it joins galaxy.yml build_ignore. The existing scripts are formatted and fixed in the commits that follow. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
This commit is contained in:
1 parent
e4c9be903d
commit
557f573df2
3 files changed
+26
No files matched your search
@@ -20,6 +20,24 @@ repos:
|
||||
args: [--strict]
|
||||
stages: ['pre-commit']
|
||||
|
||||
# Python and shell scripts under scripts/ and tests/scripts/ (#112). ruff.toml holds the
|
||||
# configuration. No --fix: a finding fails the hook instead of rewriting files in CI.
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.17.5
|
||||
hooks:
|
||||
- id: ruff-check
|
||||
stages: ['pre-commit']
|
||||
- id: ruff-format
|
||||
stages: ['pre-commit']
|
||||
|
||||
# shellcheck-py ships the shellcheck binary as a wheel, so no system package is needed.
|
||||
# Default severity, no .shellcheckrc. actionlint (below) covers the run: blocks of workflows.
|
||||
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||
rev: v0.11.0.1
|
||||
hooks:
|
||||
- id: shellcheck
|
||||
stages: ['pre-commit']
|
||||
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v6.0.0
|
||||
hooks:
|
||||
|
||||
Reference in new issue
Block a user