Bash Code Guidelines
When writing Bash code for this project, please
Format your code with shfmt.
To format a file
shfmt -ln=bash -i=4 -ci -sr -w path/to/spam.shin a terminal.
Lint your code with shellcheck.
To lint a file
shellcheck path/to/spam.shin a terminal. The settings to use are specified in
.shellcheckrc, which is automatically read by shellcheck.
The listed formatters and linters offer plugins for many popular text editors and integrated development environments (IDEs). When using these plugins, your code is formatted and linted on the fly, so you don’t have to run the commands yourself.
If you have set up pre-commit, the above formatters and linters check your code before every commit.