2019-04-20 21:15:41 +08:00
|
|
|
---
|
2019-04-19 14:57:54 +08:00
|
|
|
shellcheck:
|
|
|
|
extends: .job
|
|
|
|
stage: unit-tests
|
2020-03-14 01:29:22 +08:00
|
|
|
tags: [light]
|
2019-04-19 14:57:54 +08:00
|
|
|
variables:
|
|
|
|
SHELLCHECK_VERSION: v0.6.0
|
|
|
|
before_script:
|
2019-04-24 16:38:01 +08:00
|
|
|
- ./tests/scripts/rebase.sh
|
2020-07-28 21:03:07 +08:00
|
|
|
- curl --silent --location "https://github.com/koalaman/shellcheck/releases/download/"${SHELLCHECK_VERSION}"/shellcheck-"${SHELLCHECK_VERSION}".linux.x86_64.tar.xz" | tar -xJv
|
2019-04-19 14:57:54 +08:00
|
|
|
- cp shellcheck-"${SHELLCHECK_VERSION}"/shellcheck /usr/bin/
|
|
|
|
- shellcheck --version
|
|
|
|
script:
|
|
|
|
# Run shellcheck for all *.sh except contrib/
|
|
|
|
- find . -name '*.sh' -not -path './contrib/*' | xargs shellcheck --severity error
|
|
|
|
except: ['triggers', 'master']
|