deis / slugrunner

Buildpack application runner for Deis Workflow.
https://deis.com
MIT License
13 stars 18 forks source link

tests(Makefile): add test-style shellcheck target #27

Closed mboersma closed 8 years ago

mboersma commented 8 years ago

Since slugrunner consists of several bash scripts, shellcheck can be used to detect common shell programming errors. This adds the standard test Makefile targets and downloads the latest shellcheck binary release from S3. (v0.4.3 is also the shellcheck version installed on Deis Jenkins slaves by the deis-ci-manager ansible playbooks.)

This also fixes the few warnings that linting uncovered, then puts that commit first so that each of these commits passes on its own.

(An earlier version of this PR built shellcheck from source using Haskell's cabal, but that process takes 5-7 minutes, so I extracted the binary artifact Travis CI built and upx'ed it for download, which takes Travis one or two seconds to fetch. The entire Travis job took 24 seconds.) This uses docker-go-dev's shellcheck now.