Run shellcheck on Travis CI

This commit is contained in:
François Chavant 2017-12-02 19:22:14 +01:00
parent 45a1989a1f
commit b91a39be22
2 changed files with 13 additions and 0 deletions

View File

@ -52,6 +52,9 @@ matrix:
language: node_js
python: null
node_js: "lts/*"
- os: linux
env: TESTENV=shellcheck
services: docker
fast_finish: true
cache:

View File

@ -14,6 +14,16 @@ elif [[ $TESTENV == eslint ]]; then
# travis env
cd qutebrowser/javascript || exit 1
eslint --color --report-unused-disable-directives .
elif [[ $TESTENV == shellcheck ]]; then
dev_scripts=$( find scripts/dev/ -name '*.sh' -print0 | xargs -0 )
# false positive: we are using 'find -exec +'
# shellcheck disable=SC2038
userscripts=$( find misc/userscripts/ -type f -exec grep -lE '[/ ][bd]ash$|[/ ]sh$|[/ ]ksh$' {} + | xargs )
IFS=" " read -r -a scripts <<< "$dev_scripts $userscripts"
docker run \
-v "$PWD:/outside" \
-w /outside \
koalaman/shellcheck:stable "${scripts[@]}"
else
args=()
[[ $TRAVIS_OS_NAME == osx ]] && args=('--qute-bdd-webengine' '--no-xvfb')