aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/build.xml13
1 files changed, 11 insertions, 2 deletions
diff --git a/build/build.xml b/build/build.xml
index c033b1fefd..39a6333b5e 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -81,7 +81,7 @@
--standard=build/code_sniffer/ruleset-php-strict.xml
--ignore=phpBB/phpbb/db/migration/data/v30x/*
phpBB/phpbb"
- dir="." checkreturn="true" passthru="true" />
+ dir="." returnProperty="retval-php-strict" passthru="true" />
<exec command="phpBB/vendor/bin/phpcs
-s
--extensions=php
@@ -95,7 +95,16 @@
--ignore=phpBB/phpbb/*
--ignore=phpBB/vendor/*
phpBB"
- dir="." checkreturn="true" passthru="true" />
+ dir="." returnProperty="retval-php-legacy" passthru="true" />
+ <if>
+ <or>
+ <not><equals arg1="${retval-php-strict}" arg2="0" /></not>
+ <not><equals arg1="${retval-php-legacy}" arg2="0" /></not>
+ </or>
+ <then>
+ <fail message="PHP Code Sniffer failed." />
+ </then>
+ </if>
</target>
<target name="docs">