mirror of
https://github.com/opnsense/plugins.git
synced 2026-06-08 16:34:18 -04:00
make: style(-fix) hangs when directory is not there
This commit is contained in:
parent
6bc1ba46ac
commit
4888ae9d72
2 changed files with 10 additions and 4 deletions
2
Makefile
2
Makefile
|
|
@ -20,7 +20,7 @@ list-full:
|
|||
@echo ${PLUGIN_DIR} -- $$(${MAKE} -C ${PLUGIN_DIR} -V PLUGIN_COMMENT)
|
||||
.endfor
|
||||
|
||||
TARGETS= lint sweep sytle style-fix clean
|
||||
TARGETS= lint sweep style style-fix clean
|
||||
|
||||
.for TARGET in ${TARGETS}
|
||||
${TARGET}:
|
||||
|
|
|
|||
|
|
@ -214,8 +214,11 @@ sweep: check
|
|||
xargs -0 -n1 ${.CURDIR}/../../Scripts/cleanfile
|
||||
|
||||
style: check
|
||||
@(phpcs --standard=${.CURDIR}/../../ruleset.xml ${.CURDIR}/src \
|
||||
|| true) > ${.CURDIR}/.style.out
|
||||
@: > ${.CURDIR}/.style.out
|
||||
@if [ -d ${.CURDIR}/src ]; then \
|
||||
(phpcs --standard=${.CURDIR}/../../ruleset.xml \
|
||||
${.CURDIR}/src || true) > ${.CURDIR}/.style.out; \
|
||||
fi
|
||||
@echo -n "Total number of style warnings: "
|
||||
@grep '| WARNING' ${.CURDIR}/.style.out | wc -l
|
||||
@echo -n "Total number of style errors: "
|
||||
|
|
@ -224,6 +227,9 @@ style: check
|
|||
@rm ${.CURDIR}/.style.out
|
||||
|
||||
style-fix: check
|
||||
phpcbf --standard=${.CURDIR}/../../ruleset.xml ${.CURDIR}/src || true
|
||||
@if [ -d ${.CURDIR}/src ]; then \
|
||||
phpcbf --standard=${.CURDIR}/../../ruleset.xml \
|
||||
${.CURDIR}/src || true; \
|
||||
fi
|
||||
|
||||
.PHONY: check
|
||||
|
|
|
|||
Loading…
Reference in a new issue