summaryrefslogtreecommitdiff
path: root/tools/validate-json.sh
AgeCommit message (Collapse)AuthorFilesLines
2014-10-14add better validation checks (part 1)Lars Kellogg-Stedman1-33/+2
This patch adds a script for validating YAML files, and replaces the existing JSON checks with one largely identical to the YAML check. This also provides a script that can be installed as a pre-commit hook that will perform this checks when you commit changes. You can install the hook by running tools/pre-commit-hook --install. Change-Id: Ib4742a9db062362cfa61d669c691151bc1ca376c
2014-10-03Rename validate-json target as pep8 and improve itChmouel Boudjnah1-5/+20
When discussing with the infra guys they have mentioned it would be easier to call our linting job pep8, it's indeed badly named but that target has been used all over openstack for linting projects. As a bonus point it would make things easier to add the job to the gate. To make that patch much more interesting than a three characters change I have improved the validate-samples script to detect if jsonlint was present and if not fallback to the standard python -mjson.tool which give you less details but nonetheless works if jsonlint is present. Change-Id: I8d71a229917004dfd7223a16e4f270101cf2f0a8
2014-10-03Add validate-json tox targetChmouel Boudjnah1-0/+19
This is a simple JSON validation script based on demjson python library, we do some shell script trickeries to exit properly if there is a failure for tox (should probably patch demjson to properly exit instead). Change-Id: I930908336deef7daeaab5b55ba2031c64698d880 Implements: blueprint json-validation-gate