python-jsonschema / python-jsonschema/check-jsonschema

run against JSON files when only schema has changed

Open
#12 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
341
Forks
71
Avg merge
15d 20h
Merged PRs (30d)
4

Description

This may well not be possible, but it doesn't hurt to ask.

I have a repo containing JSON files as well as a schemas for those JSON files.
When I change a JSON file, check-jsonschema diligently checks those JSON files.
However, when I change a schema file, check-jsonschema isn't checking whether my JSON files still match the (now updated) schema.

When I add the always_run: yes toggle, it complains about there not being any instancefiles. I guess this means that git does not provide access to files that are not part of the commit. But perhaps there's a way?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how check-jsonschema selects instancefiles during pre-commit runs and how schema-only changes reach that selection. Determine whether changed schemas can trigger validation of the relevant JSON files without an instancefiles error; done means schema changes validate their JSON instances.

Written by the indexing model from the issue text.

Assessment

Tech stack
json, python
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.