summaryrefslogtreecommitdiff
path: root/.pre-commit-config.yaml
diff options
context:
space:
mode:
authormicroDev <70126934+microDev1@users.noreply.github.com>2021-03-15 19:26:29 +0530
committermicroDev <70126934+microDev1@users.noreply.github.com>2021-03-15 19:26:29 +0530
commit090b6ba42fcdfbb16844f77892087f91aa6ea201 (patch)
treef1a758bc13de5a4eb1995ddf5ef50e79fb3832a0 /.pre-commit-config.yaml
parent3cbff45f9aac5ea2855bbc888083d356a91c80fe (diff)
update pre-commit
- add formatting check - add translations check
Diffstat (limited to '.pre-commit-config.yaml')
-rw-r--r--.pre-commit-config.yaml13
1 files changed, 13 insertions, 0 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 322f37da4..5f7fc8c12 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -11,3 +11,16 @@ repos:
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|ports/esp32s2/esp-idf-config/.*|ports/esp32s2/boards/.*/sdkconfig)'
- id: trailing-whitespace
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*)'
+- 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
+ entry: sh -c "git diff --staged --name-only | xargs python3 tools/codeformat.py"
+ types_or: [c, python]
+ language: system