Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ before_script:
- pylint --errors-only ./testing

script:
- ./scripts/lint-yaml-dirs
- ./scripts/lint-json-dirs
- pre-commit run --all-files --verbose
- pytest
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ demjson
jsonschema
pre-commit
pylint
yamllint
21 changes: 21 additions & 0 deletions scripts/lint-yaml-dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Grab the execution directory
SCRIPT_DIR="$( dirname "$( readlink -f "${BASH_SOURCE[0]}" )")"
OUTPUT_SEP="==================================="

# Define variables for the directory to lint
lintDirYaml() {
echo "JSONLINT - All files in dir $1."
echo $OUTPUT_SEP
for file in "$SCRIPT_DIR/../$1/"*.yaml; do
yamllint "$file"
exitStatus=$?
if [[ $exitStatus -ne 0 ]]
then
exit $exitStatus
fi
done
echo ""
}

lintDirYaml "api"