From 44ce61ce0cd1119db2c2a6d616a37d595a7857de Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Wed, 9 Oct 2024 23:52:15 +0200 Subject: [PATCH] feat: check shell script with git hook --- lefthook.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lefthook.yaml b/lefthook.yaml index 76a8dd0..4410eea 100644 --- a/lefthook.yaml +++ b/lefthook.yaml @@ -8,11 +8,19 @@ commit-msg: run: cat {1} | convco check --from-stdin lint:typos: run: cat {1} | typos - + pre-commit: parallel: false commands: lint:typos:staged_files: run: typos {staged_files} + shellcheck: + glob: "*.sh" + run: shellcheck {staged_files} + shfmt: + glob: "*.sh" + run: shfmt -d -ln bash -i 4 {staged_files} + pre-push: parallel: false commands: