Page MenuHomeSealhub

No OneTemporary

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
@@ -1,53 +1,69 @@
<?php
$x = 0;
$y = 0;
switch ($x) {
case 1:
$x++;
continue;
case 2:
$x++;
break;
case 3:
$x++;
return;
case 4:
$x++;
throw new Exception("!");
case 5:
break 2;
case 6:
continue 2;
case 7:
case 8:
$x++;
break;
case 9:
$x++;
/* fallthrough */
case 10:
$x++;
break;
case 11:
$x++;
exit(1);
default:
break;
}
switch ($x) {
case 1:
$x++;
case 2:
break;
}
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

File Metadata

Mime Type
text/x-diff
Expires
Sat, Nov 8, 06:37 (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1034208
Default Alt Text
(1 KB)

Event Timeline