From: vrana Date: Thu, 6 Sep 2012 22:13:18 +0000 (-0700) Subject: Add a test case for false negative switch lint rule X-Git-Tag: conduit-6~134 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=339cabedcc39a8d2845656c412287cdfc8735de5;p=arcanist.git Add a test case for false negative switch lint rule Summary: I tried to fixed it but I've given up. See rP958e6cd109f3. Test Plan: $ arc unit Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3449 --- diff --git a/src/lint/linter/__tests__/xhpast/switches.lint-test b/src/lint/linter/__tests__/xhpast/switches.lint-test index e0420516..57c4a2ef 100644 --- a/src/lint/linter/__tests__/xhpast/switches.lint-test +++ b/src/lint/linter/__tests__/xhpast/switches.lint-test @@ -48,6 +48,22 @@ switch ($x) { default: $x++; } + +switch ($x) { + case 1: + while (true) { + break; + } + // TODO: false negative + case 2: + switch ($y) { + case 1: + break; + } + // TODO: false negative +} ~~~~~~~~~~ warning:41:3 warning:48:3 +disabled:57:8 +disabled:63:8