refactor: separate lint shfmt and shellcheck
This commit is contained in:
parent
1b97d625e6
commit
06554e65ed
1 changed files with 12 additions and 5 deletions
17
Makefile
17
Makefile
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue