diff --git a/Makefile b/Makefile index f2b257bf2..8783b9a6e 100644 --- a/Makefile +++ b/Makefile @@ -11,4 +11,11 @@ PLUGIN_DIRS+= ${_${CATEGORY}} .endfor list: - @echo ${PLUGIN_DIRS} +.for PLUGIN_DIR in ${PLUGIN_DIRS} + @echo ${PLUGIN_DIR} +.endfor + +lint: +.for PLUGIN_DIR in ${PLUGIN_DIRS} + ${MAKE} -C ${PLUGIN_DIR} lint +.endfor diff --git a/Mk/plugins.mk b/Mk/plugins.mk index f31c05319..d115c4618 100644 --- a/Mk/plugins.mk +++ b/Mk/plugins.mk @@ -154,4 +154,18 @@ umount: check clean: check @git reset -q . && git checkout -f . && git clean -xdqf . +lint: check + find ${.CURDIR}/src \ + -name "*.sh" -type f -print0 | xargs -0 -n1 sh -n + find ${.CURDIR}/src \ + -name "*.xml" -type f -print0 | xargs -0 -n1 xmllint --noout + find ${.CURDIR}/src \ + ! -name "*.xml" ! -name "*.xml.sample" ! -name "*.eot" \ + ! -name "*.svg" ! -name "*.woff" ! -name "*.woff2" \ + ! -name "*.otf" ! -name "*.png" ! -name "*.js" \ + ! -name "*.scss" ! -name "*.py" ! -name "*.ttf" \ + ! -name "*.tgz" ! -name "*.xml.dist" \ + -type f -print0 | xargs -0 -n1 php -l + + .PHONY: check