mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
make: style(-fix) hangs when directory is not there
This commit is contained in:
@@ -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}:
|
||||
|
||||
+9
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user