add json check before compile (#354)

* add json check before compile

* do more checking on effects

* add effects checking

* better effects checking.

* integrate schema check for default config
reduce size of default configs
This commit is contained in:
redPanther
2016-12-29 23:27:33 +01:00
committed by GitHub
parent f22848f9f4
commit 2c61b49b57
11 changed files with 1001 additions and 395 deletions

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env python
import json, sys
print("-- validate json files")
retval = 0
total = 0
errors = 0
for filename in sys.argv[1:]:
with open(filename) as f:
total += 1
msg = " check json %s ... " % filename
try:
json.load(f)
#print(msg + "ok")
except ValueError as e:
print(msg + 'invalid')
retval = 1
errors += 1
print(" checked files: %s success: %s errors: %s" % (total,(total-errors),errors))
sys.exit(retval)