diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2016-08-09 11:49:37 -0500 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2016-08-11 09:53:04 -0500 |
commit | 09c9786fab620f161e7be1dd2813b3d320724ebd (patch) | |
tree | 662e7bb7490886400f7bcb3e90ed55ee3afe0505 /share/spack/qa | |
parent | 1edfc82123d2185908feb601be3ac7adf5a6da1d (diff) | |
download | spack-09c9786fab620f161e7be1dd2813b3d320724ebd.tar.gz spack-09c9786fab620f161e7be1dd2813b3d320724ebd.tar.bz2 spack-09c9786fab620f161e7be1dd2813b3d320724ebd.tar.xz spack-09c9786fab620f161e7be1dd2813b3d320724ebd.zip |
Allow run-flake8 to be run from anywhere
Diffstat (limited to 'share/spack/qa')
-rwxr-xr-x | share/spack/qa/run-flake8 | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/share/spack/qa/run-flake8 b/share/spack/qa/run-flake8 index 2c01800ee9..2b758b7051 100755 --- a/share/spack/qa/run-flake8 +++ b/share/spack/qa/run-flake8 @@ -2,11 +2,6 @@ # # This script runs source code style checks on Spack. # -# It should be executed from the top-level directory of the repo, -# e.g.: -# -# share/spack/qa/run-flake8 -# # To run it, you'll need to have the Python flake8 installed locally. # PYTHONPATH=./lib/spack:$PYTHONPATH @@ -17,6 +12,9 @@ if [[ ! $flake8 ]]; then exit 1 fi +# Move to Spack root; allows script to be run from anywhere +cd "$(dirname "$0")/../../.." + # Add changed files that have been committed since branching off of develop changed=($(git diff --name-only --find-renames develop... -- '*.py')) # Add changed files that have been staged but not yet committed |