summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorJoseph Ciurej <ciurej1@llnl.gov>2016-05-16 12:14:57 -0700
committerJoseph Ciurej <ciurej1@llnl.gov>2016-05-16 12:14:57 -0700
commit761c5c845072f2079acaab886aac197798d9fd25 (patch)
tree4469680be061c5840a5840c5af4b5000d61a7d07 /share
parent52c8bedb9ce59998708b7562d9c784b44b466c1d (diff)
downloadspack-761c5c845072f2079acaab886aac197798d9fd25.tar.gz
spack-761c5c845072f2079acaab886aac197798d9fd25.tar.bz2
spack-761c5c845072f2079acaab886aac197798d9fd25.tar.xz
spack-761c5c845072f2079acaab886aac197798d9fd25.zip
Added line limit exemptions for 'variant' and 'version' directives.
Updated the 'scotch' package to use oneline 'variant' directives.
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/qa/run-flake89
1 files changed, 7 insertions, 2 deletions
diff --git a/share/spack/qa/run-flake8 b/share/spack/qa/run-flake8
index 42da56222c..44eb0167fb 100755
--- a/share/spack/qa/run-flake8
+++ b/share/spack/qa/run-flake8
@@ -20,12 +20,17 @@ fi
# Check if changed files are flake8 conformant [framework]
changed=$(git diff --name-only develop... | grep '.py$')
-# Exempt url lines in changed packages from overlong line errors.
-# Exempt functions defined with '@when' decorator from redefinition errors.
+# Add approved style exemptions to the changed packages.
for file in $changed; do
if [[ $file = *package.py ]]; then
cp "$file" "$file~"
+
+ # Exempt lines with urls and descriptions from overlong line errors.
perl -i -pe 's/^(\s*url\s*=.*)$/\1 # NOQA: ignore=E501/' $file
+ perl -i -pe 's/^(\s*version\(.*\).*)$/\1 # NOQA: ignore=E501/' $file
+ perl -i -pe 's/^(\s*variant\(.*\).*)$/\1 # NOQA: ignore=E501/' $file
+
+ # Exempt '@when' decorated functions from redefinition errors.
perl -i -pe 's/^(\s*\@when\(.*\).*)$/\1 # NOQA: ignore=F811/' $file
fi
done