
- 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`.
30 lines
484 B
Bash
Executable File
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
|