Bash Project Scaffolding
Install shellcheck.
$ sudo apt install shellcheck
Run linter.
$ bash run lint
Install shfmt.
$ go get -u mvdan.cc/sh/cmd/shfmt
Run command.
$ bash run format
Install bats.
$ git clone https://github.com/bats-core/bats-core.git && sudo bats-core/install.sh /usr/local
Install syntax highlight.
Run test suit.
$ bash run test
Optionally install test helpers. They are imported automatically with load 'helpers/load'
.
$ bash run install
List of currently configured test helpers:
Tasks are defined in run
file. Every function defined is a command. For example:
function check() {
lint && test
}
Can be runned with:
$ bash run check