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
|
||||
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 %'
|
||||
|
||||
.PHONY: lint_shfmt
|
||||
lint_shfmt:
|
||||
find . -type f -not -path "./uncommited/*" -a \( -iname "*.sh" -o -iname "*.tmux" \) | \
|
||||
xargs -I % sh -c 'shfmt -l -d %'
|
||||
find . -type f -not -path "./uncommited/*" -a \( -iname "*.sh" \) | \
|
||||
xargs -I % sh -c 'shfmt -i=2 -l -d -ln=bash %'
|
||||
|
||||
.PHONY: check_scripts
|
||||
check_scripts: lint_shellcheck lint_shfmt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue