Commit ae2a98dd authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

build: add pre-commit

parent 3cd33e47
Loading
Loading
Loading
Loading
+47 −0
Original line number Diff line number Diff line
---
default_install_hook_types:
  - pre-commit
  - commit-msg
repos:
  # See https://pre-commit.com/hooks.html
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
      - id: check-added-large-files
      - id: check-ast
      - id: check-case-conflict
      - id: check-executables-have-shebangs
      - id: check-json
      - id: check-yaml
      - id: check-merge-conflict
      - id: debug-statements
      - id: detect-private-key
      - id: end-of-file-fixer
      - id: trailing-whitespace
        args: [ --markdown-linebreak-ext=md ]
      # - id: pretty-format-json
      #   args: [ --indent=4, --no-sort-keys, --autofix ]
  - repo: https://github.com/compilerla/conventional-pre-commit
    rev: v4.2.0
    hooks:
      - id: conventional-pre-commit
        name: conventional pre-commit
        stages:
          - commit-msg
  -   repo: https://github.com/python-poetry/poetry
    # Poetry version.
      rev: 2.1.4
      hooks:
      - id: poetry-check
      - id: poetry-lock
      # - id: poetry-export
      # - id: poetry-install
  - repo: https://github.com/astral-sh/ruff-pre-commit
    # Ruff version.
    rev: v0.12.8
    hooks:
      # Run the linter.
      - id: ruff-check
        args: [ --fix ]
      # Run the formatter.
      - id: ruff-format