Skip to content
Snippets Groups Projects
Commit 09c9786f authored by Adam J. Stewart's avatar Adam J. Stewart
Browse files

Allow run-flake8 to be run from anywhere

parent 1edfc821
No related branches found
No related tags found
No related merge requests found
...@@ -2,11 +2,6 @@ ...@@ -2,11 +2,6 @@
# #
# This script runs source code style checks on Spack. # 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. # To run it, you'll need to have the Python flake8 installed locally.
# #
PYTHONPATH=./lib/spack:$PYTHONPATH PYTHONPATH=./lib/spack:$PYTHONPATH
...@@ -17,6 +12,9 @@ if [[ ! $flake8 ]]; then ...@@ -17,6 +12,9 @@ if [[ ! $flake8 ]]; then
exit 1 exit 1
fi 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 # Add changed files that have been committed since branching off of develop
changed=($(git diff --name-only --find-renames develop... -- '*.py')) changed=($(git diff --name-only --find-renames develop... -- '*.py'))
# Add changed files that have been staged but not yet committed # Add changed files that have been staged but not yet committed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment