2020-05-30 05:44:57 -04:00
|
|
|
# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Unlicense
|
|
|
|
|
|
|
|
repos:
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
|
|
rev: v2.3.0
|
|
|
|
hooks:
|
|
|
|
- id: check-yaml
|
|
|
|
- id: end-of-file-fixer
|
2020-09-17 19:01:23 -04:00
|
|
|
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|ports/esp32s2/esp-idf-config/.*|ports/esp32s2/boards/.*/sdkconfig)'
|
2020-05-30 05:44:57 -04:00
|
|
|
- id: trailing-whitespace
|
|
|
|
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*)'
|
2021-03-15 09:56:29 -04:00
|
|
|
- repo: local
|
|
|
|
hooks:
|
|
|
|
- id: translations
|
|
|
|
name: Translations
|
|
|
|
entry: sh -c "if ! make check-translate; then make translate; fi"
|
|
|
|
types: [c]
|
|
|
|
pass_filenames: false
|
|
|
|
language: system
|
|
|
|
- id: formatting
|
|
|
|
name: Formatting
|
2021-03-15 16:13:10 -04:00
|
|
|
entry: sh -c "git diff --staged --name-only | xargs -r python3 tools/codeformat.py"
|
2021-03-15 09:56:29 -04:00
|
|
|
types_or: [c, python]
|
|
|
|
language: system
|