repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
      - id: trailing-whitespace
      - id: check-merge-conflict
      - id: check-ast
      - id: check-json
      - id: pretty-format-json
        args: [--autofix]
      - id: check-toml
      - id: check-xml
      - id: check-symlinks
      - id: debug-statements
      - id: destroyed-symlinks
      - id: check-executables-have-shebangs
      - id: end-of-file-fixer
      - id: name-tests-test
        args: ["--pytest-test-first"]
      - id: no-commit-to-branch
        args: [--branch, main]
      - id: detect-private-key
        exclude: 'fizard/app/services/finapi/openapi/access/api.yaml'
  - repo: https://github.com/asottile/pyupgrade
    rev: v3.21.2
    hooks:
      - id: pyupgrade
  - repo: https://github.com/hukkin/mdformat
    rev: 1.0.0
    hooks:
      - id: mdformat
        additional_dependencies:
          - mdformat-config
          - mdformat-beautysh
          - mdformat-footnote
          - mdformat-gfm
          - mdformat-gfm-alerts
          - mdformat-ruff
          - mdformat-web
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.14.6
    hooks:
      - id: ruff-check
        args: [--fix, --exit-non-zero-on-fix]
      - id: ruff-format
  - repo: https://github.com/google/yamlfmt
    rev: v0.20.0
    hooks:
      - id: yamlfmt
  - repo: https://github.com/reteps/dockerfmt
    rev: v0.3.9
    hooks:
      - id: dockerfmt
        files: ^.*(Container|Docker)file.*$
        args: ["--write", "--newline"]
  - repo: https://github.com/koalaman/shellcheck-precommit
    rev: v0.11.0
    hooks:
      - id: shellcheck
  - repo: https://github.com/lovesegfault/beautysh
    rev: v6.4.2
    hooks:
      - id: beautysh
ci:
  skip:
    - no-commit-to-branch
    - shellcheck
