# See https://pre-commit.com/hooks.html for more hooks
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: check-yaml
        args:
          - --unsafe
      - id: check-json
      - id: check-toml
      - id: check-xml
      - id: check-added-large-files
      - id: check-executables-have-shebangs
      - id: check-merge-conflict
      - id: check-symlinks
      - id: detect-private-key
        exclude: ^docs/home/contact/openpgp\.min\.js$
      - id: mixed-line-ending
      - id: pretty-format-json
        args:
          - --autofix
          - --no-sort-keys
      - id: debug-statements

  - repo: https://github.com/DavidAnson/markdownlint-cli2
    # Keep this version number in sync with the one in .gitlab-ci.yml
    rev: v0.17.2
    hooks:
      - id: markdownlint-cli2
        args: ["--fix"]
        language_version: 22.10.0
