]> khamidou — GitHub mirrors - arcanist.git/commit
Add a lint warning for implicit fallthrough in switch statements
authorepriestley <git@epriestley.com>
Thu, 8 Mar 2012 20:20:19 +0000 (12:20 -0800)
committerepriestley <git@epriestley.com>
Thu, 8 Mar 2012 20:20:19 +0000 (12:20 -0800)
commit465ad3fa441d1f2c8632d141fb9c7746cbccb76d
treed85b4c79669b0691fa1cfb4460eec688ea8bf00b
parent49b83927b8ca36e21b12ea93f8fe979cfd9fb510
Add a lint warning for implicit fallthrough in switch statements

Summary: If a case does not end with break, continue, throw, exit or return and does not have a "fallthrough" comment, raise a warning.

Test Plan: Ran test case; ran linter against all of Phabricator (no hits).

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D1824
src/lint/linter/xhpast/ArcanistXHPASTLinter.php
src/lint/linter/xhpast/__tests__/data/switches.lint-test [new file with mode: 0644]