]> khamidou — GitHub mirrors - arcanist.git/commit
Add a rule to the XHPAST linter for detecting `elseif` usage.
authorJoshua Spence <josh@joshuaspence.com>
Mon, 19 May 2014 13:33:22 +0000 (06:33 -0700)
committerepriestley <git@epriestley.com>
Mon, 19 May 2014 13:33:22 +0000 (06:33 -0700)
commit566c7e9c5cf43360db481e60b49a876426027afc
tree5fdd026a6d839a7404536b2c4879b8c5f851f0c2
parent0468be3e7f155c1309ab1f335d5d9427565bb663
Add a rule to the XHPAST linter for detecting `elseif` usage.

Summary: This rule is adapted from [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ElseIfDeclarationSniff.php | PHP_CodeSniffer]] and is used to enforce the consistent use of `else if`.

Test Plan: Wrote and executed unit tests.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin, neal

Differential Revision: https://secure.phabricator.com/D9193
src/lint/linter/ArcanistXHPASTLinter.php
src/lint/linter/__tests__/xhpast/elseif.lint-test [new file with mode: 0644]