Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(pre-commit): add check-jsonschema #4002

Merged

Conversation

ambroise-arm
Copy link
Contributor

@ambroise-arm ambroise-arm commented Jun 16, 2023

Description

Use check-jsonschema from https://github.com/python-jsonschema/check-jsonschema to validate the JSON Schema files against their meta-schema. It is a CLI wrapper around the python library from https://github.com/python-jsonschema/jsonschema/

Relates to autowarefoundation/autoware-github-actions#232

Tests performed

Ran pre-commit locally on both a compliant and non-compliant .json schema file (currently only a single file under perception/lidar_apollo_segmentation_tvm_nodes/schema/lidar_apollo_segmentation_tvm_nodes.schema.json).

Effects on system behavior

Fails pre-commit if a schema file does not respect its meta-schema format.

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

Use it to validate the JSON Schema files against their meta-schema.

Issue-Id: SCM-6366
Signed-off-by: Ambroise Vincent <[email protected]>
Change-Id: I4b4990972ef7da9b4bfe33dc350fc157a27a47bb
@kenji-miyake kenji-miyake changed the title ci(pre-commit): Add check-jsonschema ci(pre-commit): add check-jsonschema Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants