Add "composure" from "https://github.com/erichs/composure@1.3.1"
git-vendor-name: composure git-vendor-dir: vendor/github.com/erichs/composure git-vendor-repository: https://github.com/erichs/composure git-vendor-ref: 1.3.1
This commit is contained in:
31
vendor/github.com/erichs/composure/test/runshellcheck.sh
generated
vendored
Executable file
31
vendor/github.com/erichs/composure/test/runshellcheck.sh
generated
vendored
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# run code quality metrics
|
||||
echo "Testing \"code quality\" with shellcheck.net in ../composure.sh:"
|
||||
datafile=shellcheck.raw
|
||||
metricfile=shellcheck.out
|
||||
|
||||
curl -s --data-urlencode script="$(cat ../composure.sh)" \
|
||||
www.shellcheck.net/shellcheck.php > $datafile
|
||||
cat $datafile | python -mjson.tool > $metricfile
|
||||
rm $datafile
|
||||
cat $metricfile
|
||||
|
||||
# check for shellcheck.net errors
|
||||
cat $metricfile | grep -q error
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "! shellcheck.net:../composure.sh:0 [ errors ] FAILED"
|
||||
rm $metricfile
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# check for shellcheck.net warnings
|
||||
cat $metricfile | grep -q warning
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "! shellcheck.net:../composure.sh:0 [ warnings ] FAILED"
|
||||
rm $metricfile
|
||||
exit 2
|
||||
fi
|
||||
|
||||
echo "! shellcheck.net:../composure.sh:0 [ no errors or warnings ] ok"
|
||||
rm $metricfile
|
||||
Reference in New Issue
Block a user