1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
repos:
- repo: local
hooks:
# ensure pixi environments are up to date
# workaround for https://github.com/prefix-dev/pixi/issues/1482
- id: pixi-install
name: Update pixi lint environment
entry: pixi install -e default -e lint
pass_filenames: false
language: system
always_run: true
require_serial: true
# pre-commit-hooks
- id: trailing-whitespace-fixer
name: Fix trailing whitespace with pre-commit-hooks
entry: pixi run -e lint trailing-whitespace-fixer
language: system
types: [text]
# pre-commit-hooks
- id: end-of-file-fixer
name: Fix end-of-file with pre-commit-hooks
entry: pixi run -e lint end-of-file-fixer
language: system
types: [text]
- id: ruff-check
name: Lint with ruff
entry: pixi run -e lint ruff check --force-exclude --fix
language: system
types_or: [python, pyi, jupyter]
require_serial: true
- id: ruff-format
name: Format with ruff
entry: pixi run -e lint ruff format --force-exclude
language: system
types_or: [python, pyi, jupyter]
require_serial: true
- id: mdformat
name: Format markdown with mdformat
entry: pixi run -e lint mdformat
language: system
types: [markdown]
- id: taplo
name: Format TOML with taplo
entry: pixi run -e lint taplo fmt
language: system
types: [toml]
|