eu-dcc-schema
eu-dcc-schema copied to clipboard
Automatically format the JSON files before commit
Add a command to the make + with a shell/batch file which formats the json files as per the standard used for this repository. The make file already does a check, the same method can be used to rewrite the files.
Update the documentation in the readme at the same time (extra dependencies + document all the make commands + section for developers for the process).
The end result should be hang-over tolerant.
Given this a little more thought - a pre-commit hook which runs the check command (and fails the commit if the formatting isn't correct) is better. I'm not comfortable with automatically rewriting a file.
Agree that a Git pre-commit hook is the best solution here.
Also makes more sense to run all of the expected checks there. Draft PR coming, testing later or tomorrow (different machine and I want to get through some other things too).