Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
432771df
Commit
432771df
authored
Nov 12, 2016
by
neilpang
Browse files
add shellcheck to CI
parent
69925ce8
Changes
1
Hide whitespace changes
Inline
Side-by-side
.travis.yml
View file @
432771df
language
:
ba
sh
language
:
sh
ell
env
:
global
:
-
SHFMT_URL=https://github.com/mvdan/sh/releases/download/v0.4.0/shfmt_v0.4.0_linux_amd64
addons
:
apt
:
sources
:
-
debian-sid
# Grab shellcheck from the Debian repo (o_O)
packages
:
-
shellcheck
script
:
-
curl -sSL $SHFMT_URL -o ~/shfmt
-
chmod +x ~/shfmt
-
~/shfmt -l -w -i 2 .
-
git diff --exit-code || (echo "Run shfmt to fix the formatting issues" &&
false
)
-
~/shfmt -l -w -i 2 . && echo "shfmt OK" || git diff --exit-code || (echo "Run shfmt to fix the formatting issues" &&
false
)
-
[
"
$?"
= "0"
]
&&
shellcheck -e SC2021,SC2126,SC2034 **/*.sh && echo "shellcheck OK" ||
false
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment