kolla-ansible/tools/validate-all-yaml.sh
Lars Kellogg-Stedman bfbf1b8c9b 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
2014-10-14 15:21:22 -04:00

10 lines
149 B
Bash
Executable File

#!/bin/sh
TOPLEVEL=$(git rev-parse --show-toplevel)
cd $TOPLEVEL
git ls-files -z '*.yaml' |
xargs -0 python tools/validate-yaml.py || exit 1