Skip to content

Instantly share code, notes, and snippets.

@topiaruss
Created June 22, 2017 17:57
Show Gist options
  • Save topiaruss/827ecf8bc68612444c7f58ea79211ae2 to your computer and use it in GitHub Desktop.
Save topiaruss/827ecf8bc68612444c7f58ea79211ae2 to your computer and use it in GitHub Desktop.
A quick yaml syntax checker.
Setup your fave virtual environment
pip install -r requirements.txt
python syntax.py
# Performs basic syntax checking for all the yml files in the current directory
import yaml
import glob
import os
if __name__ == '__main__':
for infile in [f for f in glob.glob('*.yml')]:
yy = open(infile, 'r')
parsed = yaml.load(yy)
# yaml.dump(parsed, os.sys.stdout)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment