Skip to content
Snippets Groups Projects
Commit 3eed0b96 authored by Jon Azpiazu's avatar Jon Azpiazu
Browse files

Change sh/bash script checking to use shellcheck

parent 70ac04ce
No related branches found
No related tags found
No related merge requests found
......@@ -105,18 +105,21 @@ python_syntax:
##########################################################
## Check for errors in bash/sh scripts
## Uses https://github.com/cytopia/awesome-ci
## Uses https://github.com/koalaman/shellcheck
##########################################################
bash_syntax:
before_script:
- apk add --update shellcheck
stage: postcheck
script:
- RET=0
- docker run -v ${PWD}:/ac cytopia/awesome-ci syntax-sh --path=/ac --extension=sh --ignore=.ci_config || RET=1
- docker run -v ${PWD}:/ac cytopia/awesome-ci syntax-bash --path=/ac --extension=bash --ignore=.ci_config || RET=1
- find . -type f -name '*.sh' -exec shellcheck -s sh {} \;
- find . -type f -name '*.bash' -exec shellcheck -s bash {} \;
- exit $RET
when: always
tags:
- docker
allow_failure: yes
##########################################################
## Check for errors in markdown files
......
......@@ -107,18 +107,21 @@ python_syntax:
##########################################################
## Check for errors in bash/sh scripts
## Uses https://github.com/cytopia/awesome-ci
## Uses https://github.com/koalaman/shellcheck
##########################################################
bash_syntax:
before_script:
- apk add --update shellcheck
stage: postcheck
script:
- RET=0
- docker run -v ${PWD}:/ac cytopia/awesome-ci syntax-sh --path=/ac --extension=sh --ignore=.ci_config || RET=1
- docker run -v ${PWD}:/ac cytopia/awesome-ci syntax-bash --path=/ac --extension=bash --ignore=.ci_config || RET=1
- find . -type f -name '*.sh' -exec shellcheck -s sh {} \;
- find . -type f -name '*.bash' -exec shellcheck -s bash {} \;
- exit $RET
when: always
tags:
- docker
allow_failure: yes
##########################################################
## Check for errors in markdown files
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment