aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2013-10-29 23:55:39 +0100
committerAndreas Fischer <bantu@phpbb.com>2013-10-29 23:56:11 +0100
commit721e6524253a0993eb81820556f4ac042131320e (patch)
tree1b79d536a66801756ef5457befadc1d17849c35e /build
parent387ed37b318bc47f35eaaec732644f5dac710032 (diff)
downloadforums-721e6524253a0993eb81820556f4ac042131320e.tar
forums-721e6524253a0993eb81820556f4ac042131320e.tar.gz
forums-721e6524253a0993eb81820556f4ac042131320e.tar.bz2
forums-721e6524253a0993eb81820556f4ac042131320e.tar.xz
forums-721e6524253a0993eb81820556f4ac042131320e.zip
[task/code-sniffer] Add Generic.CodeAnalysis.ForLoopShouldBeWhileLoop
PHPBB3-11980
Diffstat (limited to 'build')
-rw-r--r--build/code_sniffer/ruleset-php-legacy.xml3
1 files changed, 3 insertions, 0 deletions
diff --git a/build/code_sniffer/ruleset-php-legacy.xml b/build/code_sniffer/ruleset-php-legacy.xml
index 3e5b7c4b4d..422b04e9ae 100644
--- a/build/code_sniffer/ruleset-php-legacy.xml
+++ b/build/code_sniffer/ruleset-php-legacy.xml
@@ -5,6 +5,9 @@
<rule ref="./ruleset-minimum.xml" />
+ <!-- "for (; bar; )" should be "while (bar)" instead -->
+ <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" />
+
<!-- The body of each structure MUST be enclosed by braces. -->
<rule ref="Generic.ControlStructures.InlineControlStructure" />