Commit 50e9ebb6 authored by Franco Fichtner's avatar Franco Fichtner

make: add ruleset.xml for better style checks

parent 944de05c
...@@ -302,7 +302,7 @@ sweep: force ...@@ -302,7 +302,7 @@ sweep: force
xargs -0 -n1 scripts/cleanfile xargs -0 -n1 scripts/cleanfile
style: want-pear-PHP_CodeSniffer style: want-pear-PHP_CodeSniffer
@(phpcs --tab-width=4 --standard=PSR2 ${.CURDIR}/src/opnsense/mvc \ @(phpcs --standard=ruleset.xml ${.CURDIR}/src/opnsense/mvc \
|| true) > ${.CURDIR}/.style.out || true) > ${.CURDIR}/.style.out
@echo -n "Total number of style warnings: " @echo -n "Total number of style warnings: "
@grep '| WARNING' ${.CURDIR}/.style.out | wc -l @grep '| WARNING' ${.CURDIR}/.style.out | wc -l
...@@ -312,7 +312,7 @@ style: want-pear-PHP_CodeSniffer ...@@ -312,7 +312,7 @@ style: want-pear-PHP_CodeSniffer
@rm ${.CURDIR}/.style.out @rm ${.CURDIR}/.style.out
stylefix: want-pear-PHP_CodeSniffer stylefix: want-pear-PHP_CodeSniffer
phpcbf --standard=PSR2 ${.CURDIR}/src/opnsense/mvc || true phpcbf --standard=ruleset.xml ${.CURDIR}/src/opnsense/mvc || true
setup: force setup: force
${.CURDIR}/src/etc/rc.php_ini_setup ${.CURDIR}/src/etc/rc.php_ini_setup
......
<?xml version="1.0"?>
<ruleset name="PSR2+">
<description>Slightly enhanced version of the PSR2 standard</description>
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
<rule ref="PSR2"/>
</ruleset>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment