From bfbf1b8c9b3a0abba86474aeb72b950142723d73 Mon Sep 17 00:00:00 2001 From: Lars Kellogg-Stedman Date: Tue, 14 Oct 2014 12:17:47 -0400 Subject: add better validation checks (part 1) 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 --- tools/validate-all-yaml.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 tools/validate-all-yaml.sh (limited to 'tools/validate-all-yaml.sh') diff --git a/tools/validate-all-yaml.sh b/tools/validate-all-yaml.sh new file mode 100755 index 000000000..6a16d9a98 --- /dev/null +++ b/tools/validate-all-yaml.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +TOPLEVEL=$(git rev-parse --show-toplevel) + +cd $TOPLEVEL + +git ls-files -z '*.yaml' | + xargs -0 python tools/validate-yaml.py || exit 1 + -- cgit v1.2.3