From c4749477b0fb39dd4923104ff0f764391420ae02 Mon Sep 17 00:00:00 2001 From: Bill Wallis Date: Wed, 3 Jun 2026 06:57:49 +0100 Subject: [PATCH] chore: merge jsonschema hooks --- .pre-commit-config.yaml | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c3a170c..594c4a2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -60,30 +60,22 @@ repos: - repo: local hooks: - - id: check-pyproject-schema + - <<: &check-jsonschema-config + entry: check-jsonschema + pass_filenames: true + language: python + additional_dependencies: ["check-jsonschema==0.37.2"] + # This calls a remote URL, so run on pre-push to avoid slowing down commits + stages: ["pre-push"] + id: check-pyproject-schema name: Validate pyproject.toml schema - entry: check-jsonschema - args: ["--schemafile", "https://json.schemastore.org/pyproject.json"] files: pyproject.toml - pass_filenames: true - language: python - additional_dependencies: ["check-jsonschema==0.37.2"] - # This calls a remote URL, so run on pre-push to avoid slowing down commits - stages: ["pre-push"] - - # Keep this one separate to make it easier to delete in downstream repos - - repo: local - hooks: - - id: check-pre-commit-hooks-schema + args: ["--schemafile", "https://json.schemastore.org/pyproject.json"] + - <<: *check-jsonschema-config + id: check-pre-commit-hooks-schema name: Validate .pre-commit-hooks.yaml schema - entry: check-jsonschema - args: ["--schemafile", "https://json.schemastore.org/pre-commit-hooks.json"] files: .pre-commit-hooks.yaml - pass_filenames: true - language: python - additional_dependencies: ["check-jsonschema==0.37.2"] - # This calls a remote URL, so run on pre-push to avoid slowing down commits - stages: ["pre-push"] + args: ["--schemafile", "https://json.schemastore.org/pre-commit-hooks.json"] - repo: local hooks: