diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9384187..e01afb6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,10 +11,26 @@ repos: - repo: local hooks: - - id: check-special-event - name: check-special-event - entry: bash scripts/check-events.sh - language: system - files: ^fortune_generator/json/.*_special\.json$ + - id: check-cyclical-event + name: check-cyclical-event + entry: python3 scripts/check-events.py fortune_generator/json/cyclical_special.json cyclical + language: python + files: fortune_generator/json/cyclical_special.json + types: [json] + pass_filenames: false + + - id: check-custom-event + name: check-custom-event + entry: python3 scripts/check-events.py fortune_generator/json/custom_special.json custom + language: python + files: fortune_generator/json/custom_special.json + types: [json] + pass_filenames: false + + - id: check-static-event + name: check-static-event + entry: python3 scripts/check-events.py fortune_generator/json/static_special.json static + language: python + files: fortune_generator/json/static_special.json types: [json] pass_filenames: false diff --git a/scripts/check-events.sh b/scripts/check-events.sh deleted file mode 100755 index 6e9afe8..0000000 --- a/scripts/check-events.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -set -e - -python3 scripts/check-events.py fortune_generator/json/custom_special.json custom -python3 scripts/check-events.py fortune_generator/json/cyclical_special.json cyclical -python3 scripts/check-events.py fortune_generator/json/static_special.json static