Skip to content

Commit

Permalink
Updated the script check-docstyle.sh to be able to run from qa subdir…
Browse files Browse the repository at this point in the history
…ectory
  • Loading branch information
tisnik committed Sep 6, 2019
1 parent e776b5e commit 6d3e33c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions qa/check-docstyle.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,8 @@ function prepare_venv() {
${VIRTUALENV} -p python3 venv && source venv/bin/activate && python3 "$(which pip3)" install pydocstyle
}

pushd "${SCRIPT_DIR}/.."

# run the pydocstyle for all files that are provided in $1
function check_files() {
for source in $1
Expand Down Expand Up @@ -69,6 +75,7 @@ echo "----------------------------------------------------"

check_files "$separate_files"

popd

if [ $fail -eq 0 ]
then
Expand Down

0 comments on commit 6d3e33c

Please sign in to comment.