refactor: separate lint shfmt and shellcheck

This commit is contained in:
Maciej Sypien 2024-09-14 21:44:37 +02:00
parent 1b97d625e6
commit 06554e65ed
No known key found for this signature in database
GPG key ID: 10BC01EDA6827DC8

View file

@ -1,5 +1,12 @@
.PHONY: check-scripts .PHONY: lint_shellcheck
check-scripts: lint_shellcheck:
@# Fail if any of these files have warnings find . -type f -not -path "./uncommited/*" -a \( -iname "*.sh" -o -iname "*.tmux" \) | \
find . -type f -not -path "./uncommited/*" -a \( -iname "*.sh" -o -iname "*.tmux" \) | xargs -I % sh -c 'shellcheck %' 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_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