Skip to content

Commit

Permalink
Updated the script run-linter.sh to be able to run from qa subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
tisnik committed Sep 11, 2019
1 parent 8a416e1 commit 5bdd403
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions qa/run-linter.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
#!/bin/bash

# Script to check all Python scripts for PEP-8 issues

SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"

IFS=$'\n'

# list of directories with sources to check
directories=$(cat directories.txt)
directories=$(cat ${SCRIPT_DIR}/directories.txt)

# list of separate files to check
separate_files=$(cat files.txt)
separate_files=$(cat ${SCRIPT_DIR}/files.txt)

pass=0
fail=0
Expand All @@ -21,6 +25,9 @@ function prepare_venv() {
${VIRTUALENV} -p python3 venv && source venv/bin/activate && python3 "$(which pip3)" install pycodestyle
}

pushd "${SCRIPT_DIR}/.."


echo "----------------------------------------------------"
echo "Running Python linter against following directories:"
echo "$directories"
Expand Down Expand Up @@ -80,3 +87,5 @@ else
echo "Linter fail, $fail source files out of $total source files need to be fixed"
exit 1
fi

popd

0 comments on commit 5bdd403

Please sign in to comment.