summaryrefslogtreecommitdiff
path: root/share/spack/qa/run-style-tests
diff options
context:
space:
mode:
Diffstat (limited to 'share/spack/qa/run-style-tests')
-rwxr-xr-xshare/spack/qa/run-style-tests24
1 files changed, 24 insertions, 0 deletions
diff --git a/share/spack/qa/run-style-tests b/share/spack/qa/run-style-tests
new file mode 100755
index 0000000000..b91834f9d8
--- /dev/null
+++ b/share/spack/qa/run-style-tests
@@ -0,0 +1,24 @@
+#!/bin/bash -e
+#
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+#
+# Description:
+# Runs source code style checks on Spack.
+# See $SPACK_ROOT/.flake8 for a list of
+# approved exceptions.
+#
+# Usage:
+# run-flake8-tests
+#
+. "$(dirname $0)/setup.sh"
+check_dependencies flake8 mypy
+
+# verify that the code style is correct
+spack style
+
+# verify that the license headers are present
+spack license verify