pre-commit hook which runs shfmt on shell script files.
Example .pre-commit-config.yaml
:
- repo: https://github.com/pecigonzalo/pre-commit-shfmt
sha: master
hooks:
- id: shell-fmt
args:
- -i
- "2"
Enjoy the clean code!
This pre-commit provides 3 variations of the shfmt
hook.
id: shell-fmt
: Uses the system providedshfmt
binary.id: shell-fmt-docker
: Uses a docker imageshfmt
container.id: shell-fmt-go
: USes a Go installshfmt
package.