2019-07-23 15:37:19 +00:00
|
|
|
---
|
2019-07-23 14:42:56 +00:00
|
|
|
# This file is a template, and might need editing before it works on your project.
|
|
|
|
# see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options
|
|
|
|
|
|
|
|
# you can delete this line if you're not using Docker
|
|
|
|
image: fnichol/check-shell:latest
|
|
|
|
|
2019-07-24 08:55:01 +00:00
|
|
|
analyze:
|
2019-07-23 14:42:56 +00:00
|
|
|
stage: test
|
|
|
|
before_script:
|
|
|
|
- shellcheck --version
|
|
|
|
script:
|
2019-07-23 14:50:30 +00:00
|
|
|
- echo "--------- CHECKING POSIX SHELLSCRIPTS -------------"
|
2019-07-24 09:33:57 +00:00
|
|
|
- find . -type f -name '*.sh' | xargs shellcheck -Calways
|
2019-07-23 14:50:30 +00:00
|
|
|
- echo "--------- CHECKING ZSH SHELLSCRIPTS -------------"
|
2019-07-24 09:33:57 +00:00
|
|
|
- find . -type f -name '*.zsh' | xargs shellcheck -Calways -s bash -e SC2034
|
2019-07-23 14:42:56 +00:00
|
|
|
|
2019-07-24 08:55:01 +00:00
|
|
|
lint:
|
2019-07-23 14:42:56 +00:00
|
|
|
stage: test
|
|
|
|
before_script:
|
|
|
|
- shfmt -version
|
|
|
|
script:
|
2019-07-23 14:50:30 +00:00
|
|
|
- echo "--------- CHECKING POSIX SHELLSCRIPTS -------------"
|
2019-07-23 14:42:56 +00:00
|
|
|
- find . -type f -name '*.sh' | xargs shfmt -d -i 2
|
2019-07-23 14:50:30 +00:00
|
|
|
- echo "--------- CHECKING ZSH SHELLSCRIPTS -------------"
|
2019-07-23 14:42:56 +00:00
|
|
|
- find . -type f -name '*.zsh' | xargs shfmt -d -i 2
|