Skip to content

Commit

Permalink
Update the script check-docstyle.sh to use directories.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
tisnik committed Jul 24, 2019
1 parent 5d103e4 commit 8ca9b62
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions check-docstyle.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
#!/bin/bash

directories="src tests tools"
separate_files="setup.py"
IFS=$'\n'

# list of directories with sources to check
directories=$(cat directories.txt)

# list of separate files to check
separate_files=$(cat files.txt)

pass=0
fail=0

function prepare_venv() {
VIRTUALENV=$(which virtualenv)
VIRTUALENV="$(which virtualenv)"
if [ $? -eq 1 ]; then
# python36 which is in CentOS does not have virtualenv binary
VIRTUALENV=$(which virtualenv-3)
VIRTUALENV="$(which virtualenv-3)"
fi

${VIRTUALENV} -p python3 venv && source venv/bin/activate && python3 "$(which pip3)" install pydocstyle
Expand Down Expand Up @@ -58,7 +64,7 @@ done
echo
echo "----------------------------------------------------"
echo "Checking documentation strings in the following files"
echo $separate_files
echo "$separate_files"
echo "----------------------------------------------------"

check_files "$separate_files"
Expand Down

0 comments on commit 8ca9b62

Please sign in to comment.