fix: linting bash files according to shfmt

This commit is contained in:
Maciej Sypien 2024-09-14 23:28:14 +02:00
parent 3d55a0adbc
commit 4c233b87f2
No known key found for this signature in database
GPG key ID: 10BC01EDA6827DC8

View file

@ -1,12 +1,12 @@
.PHONY: lint_shellcheck .PHONY: lint_shellcheck
lint_shellcheck: lint_shellcheck:
find . -type f -not -path "./uncommited/*" -a \( -iname "*.sh" -o -iname "*.tmux" \) | \ find . -type f -not -path "./uncommited/*" -a \( -iname "*.sh" \) | \
xargs -I % sh -c 'shellcheck %' xargs -I % sh -c 'shellcheck %'
.PHONY: lint_shfmt .PHONY: lint_shfmt
lint_shfmt: lint_shfmt:
find . -type f -not -path "./uncommited/*" -a \( -iname "*.sh" -o -iname "*.tmux" \) | \ find . -type f -not -path "./uncommited/*" -a \( -iname "*.sh" \) | \
xargs -I % sh -c 'shfmt -l -d %' xargs -I % sh -c 'shfmt -i=2 -l -d -ln=bash %'
.PHONY: check_scripts .PHONY: check_scripts
check_scripts: lint_shellcheck lint_shfmt check_scripts: lint_shellcheck lint_shfmt