summaryrefslogtreecommitdiffstatshomepage
path: root/phpcs.xml.dist
diff options
context:
space:
mode:
authorGary Pendergast <pento@git.wordpress.org>2019-07-05 03:13:31 +0000
committerGary Pendergast <pento@git.wordpress.org>2019-07-05 03:13:31 +0000
commit027c9dae90565d99b942516363a0538a9c77c268 (patch)
tree8ae262b1f9a3f6b67c5d1c6117701fafbd1e7fde /phpcs.xml.dist
parente6b7205a8fa04c9ab9c92cd7dd7660db7e8f1f52 (diff)
downloadwordpress-027c9dae90565d99b942516363a0538a9c77c268.tar.gz
wordpress-027c9dae90565d99b942516363a0538a9c77c268.zip
Coding Standards: Fix all `WordPress.CodeAnalysis.AssignmentInCondition` issues.
`WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition` can be ignored, as this is allowed in Core. See #47632. git-svn-id: https://develop.svn.wordpress.org/trunk@45601 602fd350-edb4-49c9-b593-d223f7449a82
Diffstat (limited to 'phpcs.xml.dist')
-rw-r--r--phpcs.xml.dist5
1 files changed, 5 insertions, 0 deletions
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
index b4241cb66a..56e4fcbc35 100644
--- a/phpcs.xml.dist
+++ b/phpcs.xml.dist
@@ -184,6 +184,11 @@
</properties>
</rule>
+ <!-- Assignments in while conditions are a valid method of looping over iterables -->
+ <rule ref="WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition">
+ <exclude-pattern>*</exclude-pattern>
+ </rule>
+
<!-- Exclude the unit tests from select sniffs. -->
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
<exclude-pattern>/tests/phpunit/tests/*</exclude-pattern>