Run shellcheck on Travis CI
This commit is contained in:
parent
45a1989a1f
commit
b91a39be22
@ -52,6 +52,9 @@ matrix:
|
|||||||
language: node_js
|
language: node_js
|
||||||
python: null
|
python: null
|
||||||
node_js: "lts/*"
|
node_js: "lts/*"
|
||||||
|
- os: linux
|
||||||
|
env: TESTENV=shellcheck
|
||||||
|
services: docker
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
|
@ -14,6 +14,16 @@ elif [[ $TESTENV == eslint ]]; then
|
|||||||
# travis env
|
# travis env
|
||||||
cd qutebrowser/javascript || exit 1
|
cd qutebrowser/javascript || exit 1
|
||||||
eslint --color --report-unused-disable-directives .
|
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
|
else
|
||||||
args=()
|
args=()
|
||||||
[[ $TRAVIS_OS_NAME == osx ]] && args=('--qute-bdd-webengine' '--no-xvfb')
|
[[ $TRAVIS_OS_NAME == osx ]] && args=('--qute-bdd-webengine' '--no-xvfb')
|
||||||
|
Loading…
Reference in New Issue
Block a user