From e7c6da2c5426a6eaff1a5d572b2b432407eb0dc2 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 22 Jun 2014 01:19:02 +0200 Subject: [PATCH 1/5] [ticket/12723] Use core suffix in filename instead of phpbb in the middle. PHPBB3-12723 --- build/build.xml | 4 ++-- ...leset-phpbb-php-legacy.xml => ruleset-php-legacy-core.xml} | 0 ...leset-phpbb-php-strict.xml => ruleset-php-strict-core.xml} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename build/code_sniffer/{ruleset-phpbb-php-legacy.xml => ruleset-php-legacy-core.xml} (100%) rename build/code_sniffer/{ruleset-phpbb-php-strict.xml => ruleset-php-strict-core.xml} (80%) diff --git a/build/build.xml b/build/build.xml index 455a99fb1d..9a66853b98 100644 --- a/build/build.xml +++ b/build/build.xml @@ -77,14 +77,14 @@ + From 82c43e258bb7a78f4f17c04ca46d02ea311a077a Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 22 Jun 2014 01:20:49 +0200 Subject: [PATCH 2/5] [ticket/12723] Properly describe new Code Sniffer rulsets. PHPBB3-12723 --- build/code_sniffer/ruleset-php-legacy-core.xml | 4 ++-- build/code_sniffer/ruleset-php-strict-core.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/code_sniffer/ruleset-php-legacy-core.xml b/build/code_sniffer/ruleset-php-legacy-core.xml index 9f11ce290e..a093309a01 100644 --- a/build/code_sniffer/ruleset-php-legacy-core.xml +++ b/build/code_sniffer/ruleset-php-legacy-core.xml @@ -1,7 +1,7 @@ - + - phpBB legacy coding standard for PHP files + phpBB legacy coding standard for PHP files of phpBB core diff --git a/build/code_sniffer/ruleset-php-strict-core.xml b/build/code_sniffer/ruleset-php-strict-core.xml index b60a365ec9..5ca4d0cf1e 100644 --- a/build/code_sniffer/ruleset-php-strict-core.xml +++ b/build/code_sniffer/ruleset-php-strict-core.xml @@ -1,7 +1,7 @@ - + - phpBB legacy coding standard for PHP files + phpBB coding standard for PHP files of phpBB core From 900a5b07c4579fde8353660d1bc605d4749b631e Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 22 Jun 2014 01:28:29 +0200 Subject: [PATCH 3/5] [ticket/12757] Add a Code Sniffer ruleset for PHP files of phpBB extensions PHPBB3-12757 --- build/build.xml | 8 ++++++++ build/code_sniffer/ruleset-php-extensions.xml | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 build/code_sniffer/ruleset-php-extensions.xml diff --git a/build/build.xml b/build/build.xml index 9a66853b98..5354b5d48c 100644 --- a/build/build.xml +++ b/build/build.xml @@ -87,6 +87,7 @@ --standard=build/code_sniffer/ruleset-php-legacy-core.xml --ignore=${project.basedir}/phpBB/cache/* --ignore=${project.basedir}/phpBB/develop/* + --ignore=${project.basedir}/phpBB/ext/* --ignore=${project.basedir}/phpBB/includes/diff/*.php --ignore=${project.basedir}/phpBB/includes/sphinxapi.php --ignore=${project.basedir}/phpBB/includes/utf/data/* @@ -96,10 +97,17 @@ --ignore=${project.basedir}/phpBB/vendor/* phpBB" dir="." returnProperty="retval-php-legacy" passthru="true" /> + + diff --git a/build/code_sniffer/ruleset-php-extensions.xml b/build/code_sniffer/ruleset-php-extensions.xml new file mode 100644 index 0000000000..2d388103c3 --- /dev/null +++ b/build/code_sniffer/ruleset-php-extensions.xml @@ -0,0 +1,8 @@ + + + + phpBB coding standard for PHP files of phpBB extensions + + + + From e10bf39d08cd3f613296698cbf7b00536f15e8db Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 22 Jun 2014 01:42:43 +0200 Subject: [PATCH 4/5] [ticket/12723] Do not reference the coding guidelines section. PHPBB3-12723 --- .../phpbb/Sniffs/Commenting/FileCommentSniff.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php b/build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php index 1f64467d00..fa7d3b40c1 100644 --- a/build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php +++ b/build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php @@ -12,9 +12,8 @@ */ /** -* Checks that each source file contains the standard header. -* -* Based on Coding Guidelines 1.ii File Header. +* Checks that each PHP source file contains a valid header as defined by the +* phpBB Coding Guidelines. * * @package code_sniffer * @author Manuel Pichler From ddb35531ac0c6bba1505f2f84f0010239feea3d7 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 22 Jun 2014 01:47:22 +0200 Subject: [PATCH 5/5] [ticket/12723] Do not mention too many details on documentation. PHPBB3-12723 --- build/build.xml | 1 + build/code_sniffer/ruleset-php-legacy-core.xml | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build/build.xml b/build/build.xml index 5354b5d48c..d3489ab607 100644 --- a/build/build.xml +++ b/build/build.xml @@ -101,6 +101,7 @@ -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" /> diff --git a/build/code_sniffer/ruleset-php-legacy-core.xml b/build/code_sniffer/ruleset-php-legacy-core.xml index a093309a01..55f2461a04 100644 --- a/build/code_sniffer/ruleset-php-legacy-core.xml +++ b/build/code_sniffer/ruleset-php-legacy-core.xml @@ -5,9 +5,7 @@ - +