# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: |
  (?x)^(
    vcpkg/|
    3rdparty/ |
    .clang-format$
  )

repos:
# Base
- repo: https://github.com/pre-commit/pre-commit-hooks
  rev: v3.2.0
  hooks:
    - id: trailing-whitespace
    - id: check-yaml
    - id: check-added-large-files

# Shellcheck
- repo: https://github.com/jumanjihouse/pre-commit-hooks
  rev: 2.1.5
  hooks:
    - id: shellcheck
      args: ['-e', 'SC2016,SC2015,SC2086,SC2002,SC1117,SC2154,SC2076,SC2046,SC1090,SC2038,SC2031,SC2030,SC2162,SC2044,SC2119,SC1001,SC2120,SC2059,SC2128,SC2005,SC2013,SC2027,SC2090,SC2089,SC2124,SC2001,SC2010,SC1072,SC1073,SC1009,SC2166,SC2045,SC2028,SC1091,SC1083,SC2021']
      exclude: android

- repo: local
  hooks:
    - id: astyle
      name: AStyle
      description: Art is what I call style
      entry: ./scripts/astyle.sh
      language: script
      types: [text]

- repo: https://github.com/ambv/black
  rev: 21.9b0
  hooks:
    - id: black


- repo: https://github.com/cheshirekow/cmake-format-precommit
  rev: v0.6.13
  hooks:
  - id: cmake-format
    additional_dependencies: [pyyaml>=5.1]
    args: [--in-place]
    files: '^(src|test)/.*/CMakeLists.txt'

