aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-01-09 20:37:53 -0500
committerJack Lloyd <[email protected]>2017-01-09 20:37:53 -0500
commit076598a28972f5f92d6d9d55d2b332ae9016e869 (patch)
treec2fb4b2fcdb013e0be97e8b807b6950a57131fb1 /src
parentb1d6179b1dc23d66df2a2fa062096abef2f21bd6 (diff)
parent5340058980ca487edb10adbed9ee9cb21ef6263f (diff)
Merge GH #827 Add pylint to build, fix pylint errors in configure
Diffstat (limited to 'src')
-rwxr-xr-xsrc/scripts/ci/travis/install.sh5
-rwxr-xr-xsrc/scripts/ci/travis/lint.sh8
-rwxr-xr-xsrc/scripts/ci/travis/main.sh11
3 files changed, 24 insertions, 0 deletions
diff --git a/src/scripts/ci/travis/install.sh b/src/scripts/ci/travis/install.sh
index f430cb4ea..bea57cc82 100755
--- a/src/scripts/ci/travis/install.sh
+++ b/src/scripts/ci/travis/install.sh
@@ -20,6 +20,11 @@ fi
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
sudo apt-get -qq update
+ if [ "$BUILD_MODE" = "lint" ]; then
+ pip install --user pylint
+ pip3 install --user pylint
+ fi
+
if [ "$BUILD_MODE" = "docs" ]; then
sudo apt-get install doxygen
diff --git a/src/scripts/ci/travis/lint.sh b/src/scripts/ci/travis/lint.sh
new file mode 100755
index 000000000..fe72ff589
--- /dev/null
+++ b/src/scripts/ci/travis/lint.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -ev
+which shellcheck > /dev/null && shellcheck "$0" # Run shellcheck on this if available
+
+echo "travis_fold:start:pylint"
+python3 -m pylint configure.py
+python2 -m pylint configure.py
+echo "travis_fold:end:pylint"
diff --git a/src/scripts/ci/travis/main.sh b/src/scripts/ci/travis/main.sh
new file mode 100755
index 000000000..ed6f56063
--- /dev/null
+++ b/src/scripts/ci/travis/main.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+set -ev
+which shellcheck > /dev/null && shellcheck "$0" # Run shellcheck on this if available
+
+PARENT_DIR=$(dirname "$0")
+
+if [ "$BUILD_MODE" = "lint" ]; then
+ "$PARENT_DIR"/lint.sh
+else
+ "$PARENT_DIR"/build.sh
+fi