---
ci:
  skip:
    # https://github.com/pre-commit-ci/issues/issues/55
    - ansible-lint
exclude: >
  (?x)^(
    src/molecule_plugins/_version.py
  )$
default_language_version:
  python: python3
minimum_pre_commit_version: 1.14.0
repos:
  - repo: https://github.com/pycontribs/mirrors-prettier
    # keep it before yamllint
    rev: "v3.4.2"
    hooks:
      - id: prettier
        # Temporary excludes so we can gradually normalize the formatting
        exclude: >
          (?x)^(
            .*\.md|
            .*\{\{.*
          )$
  - repo: https://github.com/PyCQA/doc8.git
    rev: v1.1.1
    hooks:
      - id: doc8
  - repo: https://github.com/psf/black
    rev: 24.1.1
    hooks:
      - id: black
        language_version: python3
  - repo: https://github.com/pre-commit/pre-commit-hooks.git
    rev: v4.5.0
    hooks:
      - id: end-of-file-fixer
      - id: trailing-whitespace
      - id: mixed-line-ending
      - id: check-byte-order-marker
      - id: check-executables-have-shebangs
      - id: check-merge-conflict
      - id: debug-statements
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: "v0.2.0"
    hooks:
      - id: ruff
        args: [--fix, --exit-non-zero-on-fix]
  - repo: https://github.com/ansible/ansible-lint.git
    rev: v25.7.0
    hooks:
      - id: ansible-lint
        entry: env ANSIBLE_ROLES_PATH="$ANSIBLE_ROLES_PATH:test/roles" ansible-lint
