From 06554e65ed8f7dbfc74c1a6ee29fbcd4e002022a Mon Sep 17 00:00:00 2001 From: Maciej Sypien Date: Sat, 14 Sep 2024 21:44:37 +0200 Subject: [PATCH] refactor: separate lint shfmt and shellcheck --- Makefile | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 5f1ff99..a436a49 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,12 @@ -.PHONY: check-scripts -check-scripts: - @# Fail if any of these files have warnings - find . -type f -not -path "./uncommited/*" -a \( -iname "*.sh" -o -iname "*.tmux" \) | xargs -I % sh -c 'shellcheck %' - find . -type f -not -path "./uncommited/*" -a \( -iname "*.sh" -o -iname "*.tmux" \) | xargs -I % sh -c 'shfmt -l -d %' +.PHONY: lint_shellcheck +lint_shellcheck: + find . -type f -not -path "./uncommited/*" -a \( -iname "*.sh" -o -iname "*.tmux" \) | \ + xargs -I % sh -c 'shellcheck %' + +.PHONY: lint_shfmt +lint_shfmt: + find . -type f -not -path "./uncommited/*" -a \( -iname "*.sh" -o -iname "*.tmux" \) | \ + xargs -I % sh -c 'shfmt -l -d %' + +.PHONY: check_scripts +check_scripts: lint_shellcheck lint_shfmt