2019-04-20 13:15:41 +00:00
|
|
|
---
|
2019-04-19 06:57:54 +00:00
|
|
|
shellcheck:
|
|
|
|
extends: .job
|
|
|
|
stage: unit-tests
|
2020-03-13 17:29:22 +00:00
|
|
|
tags: [light]
|
2019-04-19 06:57:54 +00:00
|
|
|
variables:
|
2020-09-17 09:36:46 +00:00
|
|
|
SHELLCHECK_VERSION: v0.7.1
|
2019-04-19 06:57:54 +00:00
|
|
|
before_script:
|
2019-04-24 08:38:01 +00:00
|
|
|
- ./tests/scripts/rebase.sh
|
2020-07-28 12:57:08 +00: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 06:57:54 +00:00
|
|
|
- cp shellcheck-"${SHELLCHECK_VERSION}"/shellcheck /usr/bin/
|
|
|
|
- shellcheck --version
|
|
|
|
script:
|
|
|
|
# Run shellcheck for all *.sh except contrib/
|
2020-12-16 21:53:44 +00:00
|
|
|
- find . -name '*.sh' -not -path './contrib/*' -not -path './.git/*' | xargs shellcheck --severity error
|
2019-04-19 06:57:54 +00:00
|
|
|
except: ['triggers', 'master']
|