67 lines
1.8 KiB
YAML
67 lines
1.8 KiB
YAML
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.4.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
- id: check-yaml
|
|
- id: check-added-large-files
|
|
- repo: local
|
|
hooks:
|
|
- id: fmt
|
|
name: cargo fmt
|
|
description: Format files with cargo fmt.
|
|
entry: cargo +nightly fmt
|
|
language: system
|
|
types: [rust]
|
|
args: ["--"]
|
|
- id: cargo-check
|
|
name: cargo check
|
|
description: Check the package for errors.
|
|
entry: cargo check
|
|
language: system
|
|
args: ["--workspace"]
|
|
types: [rust]
|
|
pass_filenames: false
|
|
- id: clippy
|
|
name: clippy
|
|
description: Lint rust sources
|
|
entry: cargo clippy
|
|
language: system
|
|
args: ["--workspace", "--", "-D", "warnings"]
|
|
types: [rust]
|
|
pass_filenames: false
|
|
- repo: https://github.com/psf/black
|
|
rev: 23.7.0
|
|
hooks:
|
|
- id: black
|
|
- repo: https://github.com/pycqa/isort
|
|
rev: 5.12.0
|
|
hooks:
|
|
- id: isort
|
|
name: isort (python)
|
|
- id: isort
|
|
name: isort (pyi)
|
|
types: [pyi]
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
# Ruff version.
|
|
rev: v0.0.287
|
|
hooks:
|
|
- id: ruff
|
|
args: [--fix, --exit-non-zero-on-fix]
|
|
types_or: [python, pyi]
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
rev: 'v1.5.1'
|
|
hooks:
|
|
- id: mypy
|
|
additional_dependencies:
|
|
- "typing-extensions>=4.0.0"
|
|
- repo: https://github.com/pycqa/flake8
|
|
rev: '6.1.0'
|
|
hooks:
|
|
- id: flake8
|
|
additional_dependencies:
|
|
- "Flake8-pyproject"
|
|
- "flake8-bugbear"
|
|
- "flake8-pyi"
|
|
args: ["--toml-config", "pyargus/pyproject.toml"]
|