mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-19 01:38:54 +00:00
commit
fdcc544ae6
7 changed files with 41 additions and 27 deletions
|
@ -77,16 +77,17 @@
|
||||||
<exec command="phpBB/vendor/bin/phpcs
|
<exec command="phpBB/vendor/bin/phpcs
|
||||||
-s
|
-s
|
||||||
--extensions=php
|
--extensions=php
|
||||||
--standard=build/code_sniffer/ruleset-phpbb-php-strict.xml
|
--standard=build/code_sniffer/ruleset-php-strict-core.xml
|
||||||
--ignore=${project.basedir}/phpBB/phpbb/db/migration/data/v30x/*
|
--ignore=${project.basedir}/phpBB/phpbb/db/migration/data/v30x/*
|
||||||
phpBB/phpbb"
|
phpBB/phpbb"
|
||||||
dir="." returnProperty="retval-php-strict" passthru="true" />
|
dir="." returnProperty="retval-php-strict" passthru="true" />
|
||||||
<exec command="phpBB/vendor/bin/phpcs
|
<exec command="phpBB/vendor/bin/phpcs
|
||||||
-s
|
-s
|
||||||
--extensions=php
|
--extensions=php
|
||||||
--standard=build/code_sniffer/ruleset-phpbb-php-legacy.xml
|
--standard=build/code_sniffer/ruleset-php-legacy-core.xml
|
||||||
--ignore=${project.basedir}/phpBB/cache/*
|
--ignore=${project.basedir}/phpBB/cache/*
|
||||||
--ignore=${project.basedir}/phpBB/develop/*
|
--ignore=${project.basedir}/phpBB/develop/*
|
||||||
|
--ignore=${project.basedir}/phpBB/ext/*
|
||||||
--ignore=${project.basedir}/phpBB/includes/diff/*.php
|
--ignore=${project.basedir}/phpBB/includes/diff/*.php
|
||||||
--ignore=${project.basedir}/phpBB/includes/sphinxapi.php
|
--ignore=${project.basedir}/phpBB/includes/sphinxapi.php
|
||||||
--ignore=${project.basedir}/phpBB/includes/utf/data/*
|
--ignore=${project.basedir}/phpBB/includes/utf/data/*
|
||||||
|
@ -96,10 +97,18 @@
|
||||||
--ignore=${project.basedir}/phpBB/vendor/*
|
--ignore=${project.basedir}/phpBB/vendor/*
|
||||||
phpBB"
|
phpBB"
|
||||||
dir="." returnProperty="retval-php-legacy" passthru="true" />
|
dir="." returnProperty="retval-php-legacy" passthru="true" />
|
||||||
|
<exec command="phpBB/vendor/bin/phpcs
|
||||||
|
-s
|
||||||
|
--extensions=php
|
||||||
|
--standard=build/code_sniffer/ruleset-php-extensions.xml
|
||||||
|
--ignore=${project.basedir}/phpBB/ext/*/tests/*
|
||||||
|
phpBB/ext"
|
||||||
|
dir="." returnProperty="retval-php-ext" passthru="true" />
|
||||||
<if>
|
<if>
|
||||||
<or>
|
<or>
|
||||||
<not><equals arg1="${retval-php-strict}" arg2="0" /></not>
|
<not><equals arg1="${retval-php-strict}" arg2="0" /></not>
|
||||||
<not><equals arg1="${retval-php-legacy}" arg2="0" /></not>
|
<not><equals arg1="${retval-php-legacy}" arg2="0" /></not>
|
||||||
|
<not><equals arg1="${retval-php-ext}" arg2="0" /></not>
|
||||||
</or>
|
</or>
|
||||||
<then>
|
<then>
|
||||||
<fail message="PHP Code Sniffer failed." />
|
<fail message="PHP Code Sniffer failed." />
|
||||||
|
|
|
@ -12,9 +12,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks that each source file contains the standard header.
|
* Checks that each PHP source file contains a valid header as defined by the
|
||||||
*
|
* phpBB Coding Guidelines.
|
||||||
* Based on Coding Guidelines 1.ii File Header.
|
|
||||||
*
|
*
|
||||||
* @package code_sniffer
|
* @package code_sniffer
|
||||||
* @author Manuel Pichler <mapi@phpundercontrol.org>
|
* @author Manuel Pichler <mapi@phpundercontrol.org>
|
||||||
|
|
8
build/code_sniffer/ruleset-php-extensions.xml
Normal file
8
build/code_sniffer/ruleset-php-extensions.xml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<ruleset name="phpBB PHP Strict Standard Extensions">
|
||||||
|
|
||||||
|
<description>phpBB coding standard for PHP files of phpBB extensions</description>
|
||||||
|
|
||||||
|
<rule ref="./ruleset-php-strict.xml" />
|
||||||
|
|
||||||
|
</ruleset>
|
11
build/code_sniffer/ruleset-php-legacy-core.xml
Normal file
11
build/code_sniffer/ruleset-php-legacy-core.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<ruleset name="phpBB PHP Legacy Standard Core">
|
||||||
|
|
||||||
|
<description>phpBB legacy coding standard for PHP files of phpBB core</description>
|
||||||
|
|
||||||
|
<rule ref="./ruleset-php-legacy.xml" />
|
||||||
|
|
||||||
|
<!-- Each file MUST start with a valid header as defined by the Coding Guidelines -->
|
||||||
|
<rule ref="./phpbb/Sniffs/Commenting/FileCommentSniff.php" />
|
||||||
|
|
||||||
|
</ruleset>
|
9
build/code_sniffer/ruleset-php-strict-core.xml
Normal file
9
build/code_sniffer/ruleset-php-strict-core.xml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<ruleset name="phpBB PHP Strict Standard Core">
|
||||||
|
|
||||||
|
<description>phpBB coding standard for PHP files of phpBB core</description>
|
||||||
|
|
||||||
|
<rule ref="./ruleset-php-legacy-core.xml" />
|
||||||
|
<rule ref="./ruleset-php-strict.xml" />
|
||||||
|
|
||||||
|
</ruleset>
|
|
@ -1,13 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<ruleset name="phpBB PHP Legacy Standard">
|
|
||||||
|
|
||||||
<description>phpBB legacy coding standard for PHP files</description>
|
|
||||||
|
|
||||||
<rule ref="./ruleset-php-legacy.xml" />
|
|
||||||
|
|
||||||
<!-- THe header file MUST contains:
|
|
||||||
- the phpBB copyright: (c) phpBB Limited <https://www.phpbb.com>
|
|
||||||
- the phpBB License: GNU General Public License, version 2 (GPL-2.0) -->
|
|
||||||
<rule ref="./phpbb/Sniffs/Commenting/FileCommentSniff.php" />
|
|
||||||
|
|
||||||
</ruleset>
|
|
|
@ -1,9 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<ruleset name="phpBB PHP Legacy Standard">
|
|
||||||
|
|
||||||
<description>phpBB legacy coding standard for PHP files</description>
|
|
||||||
|
|
||||||
<rule ref="./ruleset-phpbb-php-legacy.xml" />
|
|
||||||
<rule ref="./ruleset-php-strict.xml" />
|
|
||||||
|
|
||||||
</ruleset>
|
|
Loading…
Add table
Reference in a new issue