Skip to content

Latest commit

 

History

History
80 lines (52 loc) · 1.39 KB

README.md

File metadata and controls

80 lines (52 loc) · 1.39 KB

bash-scaffolding Build Status

Bash Project Scaffolding

Requirements

Linter

Install shellcheck.

$ sudo apt install shellcheck

Run linter.

$ bash run lint

Formatter

Install shfmt.

$ go get -u mvdan.cc/sh/cmd/shfmt

Run command.

$ bash run format

Test Framework

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

Test Helpers

Optionally install test helpers. They are imported automatically with load 'helpers/load'.

$ bash run install

List of currently configured test helpers:

Configuring tasks

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