diff options
author | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2018-12-14 10:15:22 +0000 |
---|---|---|
committer | Linaro Code Review <review@review.linaro.org> | 2018-12-14 10:15:22 +0000 |
commit | d9320588c993a48ca495808205403acc34778372 (patch) | |
tree | 79114b0d53ec917b7d958c3f6e604bf3bb7e96ab | |
parent | 7733c0378a99dbdd45f6d7c7c8b914f522e91800 (diff) | |
parent | ed017435310757d74dd6d566501a125b8bfb7016 (diff) |
Merge "Add sanity-check.sh"
-rwxr-xr-x | sanity-check.sh | 8 | ||||
-rwxr-xr-x | validate.py | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/sanity-check.sh b/sanity-check.sh new file mode 100755 index 0000000..9174831 --- /dev/null +++ b/sanity-check.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -ex + +python3 validate.py \ + -g \ + -r build-error.txt \ + -p E501 \ + -s SC1091 diff --git a/validate.py b/validate.py index 147c70c..28c62e4 100755 --- a/validate.py +++ b/validate.py @@ -144,7 +144,7 @@ def validate_yaml(filename, args): publish_result(["* YAMLVALID [PASSED]: " + filename + " - deleted"], args) return 0 try: - y = yaml.load(filecontent) + yaml.load(filecontent) message = "* YAMLVALID: [PASSED]: " + filename print_stderr(message) except yaml.YAMLError: @@ -163,7 +163,9 @@ def validate_yaml(filename, args): def validate_shell(filename, ignore_options): ignore_string = "" if args.shellcheck_ignore is not None: - ignore_string = "-e %s" % " ".join(args.shellcheck_ignore) + # Exclude types of warnings in the following format: + # -e CODE1,CODE2.. + ignore_string = "-e %s" % ",".join(args.shellcheck_ignore) if len(ignore_string) < 4: # contains only "-e " ignore_string = "" cmd = 'shellcheck %s' % ignore_string |