spack/share/spack/qa/run-flake8-tests
Todd Gamblin 1b7f9e24f4 Add spack flake8 command. (#2186)
- Ported old run-flake8-tests qa script to `spack flake8` command.
- New command does not modify files in the source tree
- Copies files to a temp stage modifies them there, and runs tests.
- Updated docs and `run-flake8-tests` script to call `spack flake8`.
2016-10-31 11:40:20 -07:00

30 lines
484 B
Bash
Executable File

#!/usr/bin/env bash
#
# Description:
# Runs source code style checks on Spack.
# See $SPACK_ROOT/.flake8 for a list of
# approved exceptions.
#
# Usage:
# run-flake8-tests
#
# Notes:
# Requires flake8.
#
QA_DIR="$(dirname "$0")"
SPACK_ROOT="$QA_DIR/../../.."
# Array of dependencies
deps=(
flake8
)
# Check for dependencies
"$QA_DIR/check_dependencies" "${deps[@]}" || exit 1
# Add Spack to the PATH.
export PATH="$SPACK_ROOT/bin:$PATH"
exec spack flake8