Merge branch '42-enable-linting-and-fixing-for-sh-files' into 'master'
Resolve "Enable linting and fixing for sh files" Closes #42 See merge request marty-oehme/dotfiles!15
This commit is contained in:
commit
7f6b1d5c03
1 changed files with 25 additions and 0 deletions
25
.gitlab-ci.yml
Normal file
25
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
# 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
|
||||
|
||||
shellcheck:
|
||||
stage: test
|
||||
before_script:
|
||||
- shellcheck --version
|
||||
script:
|
||||
- echo "######### CHECKING POSIX SHELLSCRIPTS ###########"
|
||||
- find . -type f -name '*.sh' | xargs shellcheck
|
||||
- echo "######### CHECKING ZSH SHELLSCRIPTS ###########"
|
||||
- find . -type f -name '*.zsh' | xargs shellcheck
|
||||
|
||||
shfmt:
|
||||
stage: test
|
||||
before_script:
|
||||
- shfmt -version
|
||||
script:
|
||||
- echo "######### CHECKING POSIX FORMATTING ###########"
|
||||
- find . -type f -name '*.sh' | xargs shfmt -d -i 2
|
||||
- echo "######### CHECKING ZSH FORMATTING ###########"
|
||||
- find . -type f -name '*.zsh' | xargs shfmt -d -i 2
|
Loading…
Reference in a new issue