# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
  rev: v4.3.0
  hooks:
  - id: check-added-large-files
  - id: fix-byte-order-marker
  - id: check-case-conflict
  - id: check-executables-have-shebangs
  - id: check-json
  - id: check-merge-conflict
  - id: check-shebang-scripts-are-executable
  - id: check-symlinks
  - id: check-yaml
  - id: destroyed-symlinks
  - id: end-of-file-fixer
  - id: mixed-line-ending
  - id: pretty-format-json
    args:
      - "--autofix"
      - "--indent=2"
      - "--no-ensure-ascii"
      - "--no-sort-keys"
  - id: trailing-whitespace
- repo: https://github.com/sirosen/texthooks
  rev: 0.4.0
  hooks:
  - id: forbid-bidi-controls
- repo: https://github.com/pre-commit/mirrors-clang-format
  rev: v19.1.1
  hooks:
  - id: clang-format
    types_or: [c++, c]
- repo: local
  hooks:
    - id: include_tango_h
      name: Check that tango/tango.h is not included in source code
      types_or: [c++, c]
      exclude: 'tests/'
      args: [--multiline]
      entry: "#include <tango/tango.h>"
      language: pygrep
- repo: local
  hooks:
    - id: check_unsafe_number_parsing
      name: Check that no unsafe string number conversion routines are used
      types_or: [c++, c]
      exclude: '(src/common/parse\.cpp)|(log4tango/src/Level\.cpp)'
      args: [--multiline]
      entry: "(ato(i|l|ll|f)|strto(l|ll|ul|ull|f|d|ld)|strtoimax|strtoumax)"
      language: pygrep
