fix: linting bash files according to shfmt
This commit is contained in:
parent
3d55a0adbc
commit
4c233b87f2
1 changed files with 3 additions and 3 deletions
6
Makefile
6
Makefile
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue