Skip to content
Snippets Groups Projects
.pre-commit-config.yaml 1.37 KiB
Newer Older
Mélodie Boillet's avatar
Mélodie Boillet committed
repos:
Yoann Schneider's avatar
Yoann Schneider committed
  - repo: https://github.com/astral-sh/ruff-pre-commit
    # Ruff version.
    rev: v0.2.2
Mélodie Boillet's avatar
Mélodie Boillet committed
    hooks:
      # Run the linter.
Yoann Schneider's avatar
Yoann Schneider committed
      - id: ruff
        args: [--fix, --exit-non-zero-on-fix]
      # Run the formatter.
      - id: ruff-format
Mélodie Boillet's avatar
Mélodie Boillet committed
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.5.0
Mélodie Boillet's avatar
Mélodie Boillet committed
    hooks:
      - id: check-ast
      - id: check-docstring-first
      - id: check-executables-have-shebangs
      - id: check-merge-conflict
      - id: check-symlinks
      - id: debug-statements
      - id: trailing-whitespace
      - id: check-yaml
        args: [--allow-multiple-documents]
      - id: mixed-line-ending
      - id: name-tests-test
        args: ['--django']
      - id: check-json
      - id: requirements-txt-fixer
      - id: end-of-file-fixer
      - id: mixed-line-ending
  - repo: https://github.com/codespell-project/codespell
    rev: v2.2.6
Mélodie Boillet's avatar
Mélodie Boillet committed
    hooks:
      - id: codespell
Yoann Schneider's avatar
Yoann Schneider committed
        args:
        - --write-changes
        - --exclude-file=LICENCE
  - repo: https://github.com/PyCQA/doc8
Yoann Schneider's avatar
Yoann Schneider committed
    rev: v1.1.1
    hooks:
      - id: doc8
Mélodie Boillet's avatar
Mélodie Boillet committed
  - repo: meta
    hooks:
      - id: check-useless-excludes
  - repo: https://github.com/executablebooks/mdformat
    rev: 0.7.17
    hooks:
    - id: mdformat
      exclude: tests/data/analyze|tests/data/evaluate/.*.md
      # Optionally add plugins
      additional_dependencies:
      - mdformat-mkdocs[recommended]