[gitlab] Let shellcheck choose sh version

This commit is contained in:
Marty Oehme 2019-07-24 10:55:01 +02:00
parent bedf7e18a9
commit bf23178314

View file

@ -5,17 +5,17 @@
# you can delete this line if you're not using Docker # you can delete this line if you're not using Docker
image: fnichol/check-shell:latest image: fnichol/check-shell:latest
shellcheck: analyze:
stage: test stage: test
before_script: before_script:
- shellcheck --version - shellcheck --version
script: script:
- echo "--------- CHECKING POSIX SHELLSCRIPTS -------------" - echo "--------- CHECKING POSIX SHELLSCRIPTS -------------"
- find . -type f -name '*.sh' | xargs shellcheck -s sh - find . -type f -name '*.sh' | xargs shellcheck
- echo "--------- CHECKING ZSH SHELLSCRIPTS -------------" - echo "--------- CHECKING ZSH SHELLSCRIPTS -------------"
- find . -type f -name '*.zsh' | xargs shellcheck -s bash - find . -type f -name '*.zsh' | xargs shellcheck -s bash -e SC2034
shfmt: lint:
stage: test stage: test
before_script: before_script:
- shfmt -version - shfmt -version
@ -24,3 +24,11 @@ shfmt:
- find . -type f -name '*.sh' | xargs shfmt -d -i 2 - find . -type f -name '*.sh' | xargs shfmt -d -i 2
- echo "--------- CHECKING ZSH SHELLSCRIPTS -------------" - echo "--------- CHECKING ZSH SHELLSCRIPTS -------------"
- find . -type f -name '*.zsh' | xargs shfmt -d -i 2 - find . -type f -name '*.zsh' | xargs shfmt -d -i 2
test:
stage: test
image: bats/bats:latest
before_script:
- bats --version
script:
- bats -r .