Page MenuHomePhabricator

D11176.id31697.diff
No OneTemporary

D11176.id31697.diff

diff --git a/src/lint/ArcanistLintMessage.php b/src/lint/ArcanistLintMessage.php
--- a/src/lint/ArcanistLintMessage.php
+++ b/src/lint/ArcanistLintMessage.php
@@ -72,7 +72,7 @@
}
public function setLine($line) {
- $this->line = $line;
+ $this->line = (int)$line;
return $this;
}
@@ -81,7 +81,7 @@
}
public function setChar($char) {
- $this->char = $char;
+ $this->char = (int)$char;
return $this;
}
diff --git a/src/lint/linter/__tests__/ArcanistLinterTestCase.php b/src/lint/linter/__tests__/ArcanistLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistLinterTestCase.php
@@ -121,8 +121,8 @@
$linter->addPath($path_name);
$linter->addData($path_name, $data);
-
- foreach (idx($config, 'config', array()) as $key => $value) {
+ $config = idx($config, 'config', array());
+ foreach ($config as $key => $value) {
$linter->setLinterConfigurationValue($key, $value);
}
@@ -175,81 +175,123 @@
$this->compareTransform($xform, $after_lint);
}
- private function compareLint($file, $expect, ArcanistLintResult $result) {
- $seen = array();
- $raised = array();
- $message_map = array();
-
- foreach ($result->getMessages() as $message) {
- $sev = $message->getSeverity();
- $line = $message->getLine();
- $char = $message->getChar();
- $code = $message->getCode();
- $name = $message->getName();
- $message_key = $sev.':'.$line.':'.$char;
- $message_map[$message_key] = $message;
- $seen[] = $message_key;
- $raised[] = sprintf(
- ' %s: %s %s',
- pht('%s at line %d, char %d', $sev, $line, $char),
- $code,
- $name);
- }
+ private function compareLint($file, $expect, ArcanistLintResult $results) {
+ $expected_results = new ArcanistLintResult();
+
$expect = trim($expect);
if ($expect) {
$expect = explode("\n", $expect);
} else {
$expect = array();
}
- foreach ($expect as $key => $expected) {
- $expect[$key] = head(explode(' ', $expected));
- }
+ foreach ($expect as $result) {
+ $parts = explode(':', $result);
+
+ $message = new ArcanistLintMessage();
- $expect = array_fill_keys($expect, true);
- $seen = array_fill_keys($seen, true);
+ if ($severity = idx($parts, 0)) {
+ $message->setSeverity($severity);
+ }
+
+ if ($line = idx($parts, 1)) {
+ $message->setLine((int)$line);
+ }
+ if ($char = idx($parts, 2)) {
+ $message->setChar((int)$char);
+ }
+ if ($code = idx($parts, 3)) {
+ $message->setCode($code);
+ }
- if (!$raised) {
- $raised = array(pht('No messages.'));
+ $expected_results->addMessage($message);
}
- $raised = sprintf(
- "%s:\n%s",
- pht('Actually raised'),
- implode("\n", $raised));
- foreach (array_diff_key($expect, $seen) as $missing => $ignored) {
- $missing = explode(':', $missing);
- $sev = array_shift($missing);
- $pos = $missing;
+ $missing = array();
+ $surprising = $results->getMessages();
- $this->assertFailure(
- pht(
- "In '%s', expected lint to raise %s on line %d at char %d, ".
- "but no %s was raised. %s",
- $file,
- $sev,
- idx($pos, 0),
- idx($pos, 1),
- $sev,
- $raised));
+ // TODO: Make this more efficient.
+ foreach ($expected_results->getMessages() as $expected_message) {
+ $found = false;
+
+ foreach ($results->getMessages() as $ii => $actual_message) {
+ if (!self::compareLintMessageProperty(
+ $expected_message->getSeverity(),
+ $actual_message->getSeverity())) {
+
+ continue;
+ }
+
+ if (!self::compareLintMessageProperty(
+ $expected_message->getLine(),
+ $actual_message->getLine())) {
+
+ continue;
+ }
+
+ if (!self::compareLintMessageProperty(
+ $expected_message->getChar(),
+ $actual_message->getChar())) {
+
+ continue;
+ }
+
+ if (!self::compareLintMessageProperty(
+ $expected_message->getCode(),
+ $actual_message->getCode())) {
+
+ continue;
+ }
+
+ $found = true;
+ unset($surprising[$ii]);
+ }
+
+ if (!$found) {
+ $missing[] = $expected_message;
+ }
}
- foreach (array_diff_key($seen, $expect) as $surprising => $ignored) {
- $message = $message_map[$surprising];
- $message_info = $message->getDescription();
+ if ($missing || $surprising) {
+ $expected = 'Expected to raise';
+ if ($missing) {
+ foreach ($missing as $message) {
+ $expected .= sprintf(
+ "\n %s: %s %s",
+ pht(
+ '%s at line %d, char %d',
+ $message->getSeverity(),
+ $message->getLine(),
+ $message->getChar()),
+ $message->getCode(),
+ $message->getName());
+ }
+ } else {
+ $expected .= sprintf("\n %s", pht('No messages'));
+ }
+
+ $actual = 'Actually raised';
+ if ($surprising) {
+ foreach ($surprising as $message) {
+ $actual .= sprintf(
+ "\n %s: %s %s",
+ pht(
+ '%s at line %d, char %d',
+ $message->getSeverity(),
+ $message->getLine(),
+ $message->getChar()),
+ $message->getCode(),
+ $message->getName());
+ }
+ } else {
+ $actual .= sprintf("\n %s", pht('No messages'));
+ }
- list($sev, $line, $char) = explode(':', $surprising);
$this->assertFailure(
sprintf(
- "%s:\n\n%s\n\n%s",
- pht(
- "In '%s', lint raised %s on line %d at char %d, ".
- "but nothing was expected",
- $file,
- $sev,
- $line,
- $char),
- $message_info,
- $raised));
+ "%s\n\n%s\n\n%s",
+ pht("Lint failed for '%s'.", $file),
+ $expected,
+ $actual));
}
}
@@ -263,4 +305,18 @@
pht('File as patched by lint did not match the expected patched file.'));
}
+ /**
+ * Compare properties of @{class:ArcanistLintMessage} instances.
+ *
+ * The expectation is that if one (or both) of the properties is null, then
+ * we don't care about its value.
+ *
+ * @param wild
+ * @param wild
+ * @return bool
+ */
+ private static function compareLintMessageProperty($x, $y) {
+ return $x === null || $y === null || $x === $y;
+ }
+
}
diff --git a/src/lint/linter/__tests__/chmod/empty_executable.lint-test b/src/lint/linter/__tests__/chmod/empty_executable.lint-test
--- a/src/lint/linter/__tests__/chmod/empty_executable.lint-test
+++ b/src/lint/linter/__tests__/chmod/empty_executable.lint-test
@@ -1,5 +1,5 @@
~~~~~~~~~~
-warning::
+warning::CHMOD1
~~~~~~~~~~
~~~~~~~~~~
{"mode": "0755"}
diff --git a/src/lint/linter/__tests__/filename/bad_filename.lint-test b/src/lint/linter/__tests__/filename/bad_filename.lint-test
--- a/src/lint/linter/__tests__/filename/bad_filename.lint-test
+++ b/src/lint/linter/__tests__/filename/bad_filename.lint-test
@@ -1,5 +1,5 @@
~~~~~~~~~~
-error::
+error::NAME1
~~~~~~~~~~
~~~~~~~~~~
{"path": "bad@filename"}
diff --git a/src/lint/linter/__tests__/mergeconflict/mergeconflict.lint-test b/src/lint/linter/__tests__/mergeconflict/mergeconflict.lint-test
--- a/src/lint/linter/__tests__/mergeconflict/mergeconflict.lint-test
+++ b/src/lint/linter/__tests__/mergeconflict/mergeconflict.lint-test
@@ -7,4 +7,4 @@
>>>>>>> branch2
}
~~~~~~~~~~
-error:5:1
+error:5:1:MERGECONFLICT1
diff --git a/src/lint/linter/__tests__/phlxhp/array-combine.lint-test b/src/lint/linter/__tests__/phlxhp/array-combine.lint-test
--- a/src/lint/linter/__tests__/phlxhp/array-combine.lint-test
+++ b/src/lint/linter/__tests__/phlxhp/array-combine.lint-test
@@ -3,4 +3,4 @@
array_combine($x, $x);
array_combine($x, $y);
~~~~~~~~~~
-warning:3:1
+warning:3:1:PHLXHP2
diff --git a/src/lint/linter/__tests__/phlxhp/deprecated-function.lint-test b/src/lint/linter/__tests__/phlxhp/deprecated-function.lint-test
--- a/src/lint/linter/__tests__/phlxhp/deprecated-function.lint-test
+++ b/src/lint/linter/__tests__/phlxhp/deprecated-function.lint-test
@@ -3,4 +3,4 @@
deprecated_function();
modern_function();
~~~~~~~~~~
-warning:3:1
+warning:3:1:PHLXHP3
diff --git a/src/lint/linter/__tests__/phlxhp/pht.lint-test b/src/lint/linter/__tests__/phlxhp/pht.lint-test
--- a/src/lint/linter/__tests__/phlxhp/pht.lint-test
+++ b/src/lint/linter/__tests__/phlxhp/pht.lint-test
@@ -20,8 +20,8 @@
EOT
);
~~~~~~~~~~
-warning:5:1
-warning:7:1
-warning:8:1
-warning:10:1
-warning:18:1
+warning:5:1:PHLXHP4
+warning:7:1:PHLXHP4
+warning:8:1:PHLXHP4
+warning:10:1:PHLXHP4
+warning:18:1:PHLXHP4
diff --git a/src/lint/linter/__tests__/phlxhp/ragged-classtree-edges.lint-test b/src/lint/linter/__tests__/phlxhp/ragged-classtree-edges.lint-test
--- a/src/lint/linter/__tests__/phlxhp/ragged-classtree-edges.lint-test
+++ b/src/lint/linter/__tests__/phlxhp/ragged-classtree-edges.lint-test
@@ -9,4 +9,4 @@
*/
class D { }
~~~~~~~~~~
-warning:3:7
+warning:3:7:PHLXHP5
diff --git a/src/lint/linter/__tests__/phlxhp/xsprintf.lint-test b/src/lint/linter/__tests__/phlxhp/xsprintf.lint-test
--- a/src/lint/linter/__tests__/phlxhp/xsprintf.lint-test
+++ b/src/lint/linter/__tests__/phlxhp/xsprintf.lint-test
@@ -9,5 +9,5 @@
qsprintf('x', $y);
~~~~~~~~~~
-warning:4:1
-warning:9:1
+warning:4:1:PHLXHP4
+warning:9:1:PHLXHP4
diff --git a/src/lint/linter/__tests__/php/fatal.lint-test b/src/lint/linter/__tests__/php/fatal.lint-test
--- a/src/lint/linter/__tests__/php/fatal.lint-test
+++ b/src/lint/linter/__tests__/php/fatal.lint-test
@@ -4,4 +4,4 @@
$this = "cannot be re-assigned";
}
~~~~~~~~~
-error:4:
+error:4::PHP1
diff --git a/src/lint/linter/__tests__/php/syntax.lint-test b/src/lint/linter/__tests__/php/syntax.lint-test
--- a/src/lint/linter/__tests__/php/syntax.lint-test
+++ b/src/lint/linter/__tests__/php/syntax.lint-test
@@ -4,4 +4,4 @@
this is bad syntax;
}
~~~~~~~~~
-error:4:
+error:4::PHP2
diff --git a/src/lint/linter/__tests__/ruby/hello.lint-test b/src/lint/linter/__tests__/ruby/hello.lint-test
--- a/src/lint/linter/__tests__/ruby/hello.lint-test
+++ b/src/lint/linter/__tests__/ruby/hello.lint-test
@@ -1,4 +1,4 @@
def hello()
puts "hello world"
~~~~~~~~~~
-error:2:
+error:2::RUBY
diff --git a/src/lint/linter/__tests__/spelling/spell.lint-test b/src/lint/linter/__tests__/spelling/spell.lint-test
--- a/src/lint/linter/__tests__/spelling/spell.lint-test
+++ b/src/lint/linter/__tests__/spelling/spell.lint-test
@@ -10,11 +10,11 @@
Added ZZZZsupermnZZZZ
Added full batmn batmnZZZZ
~~~~~~~~~~
-warning:2:1
-warning:4:10
-warning:5:15
-warning:7:7
-warning:7:12
-warning:9:15
-warning:10:11
-warning:11:12
+warning:2:1:SPELL1
+warning:4:10:SPELL2
+warning:5:15:SPELL2
+warning:7:7:SPELL2
+warning:7:12:SPELL2
+warning:9:15:SPELL1
+warning:10:11:SPELL2
+warning:11:12:SPELL1
diff --git a/src/lint/linter/__tests__/text/bad-charset.lint-test b/src/lint/linter/__tests__/text/bad-charset.lint-test
--- a/src/lint/linter/__tests__/text/bad-charset.lint-test
+++ b/src/lint/linter/__tests__/text/bad-charset.lint-test
@@ -1,3 +1,3 @@
❤♎☀★☂♞
~~~~~~~~~~
-error:1:1
+error:1:1:TXT5
diff --git a/src/lint/linter/__tests__/text/bof-whitespace-1.lint-test b/src/lint/linter/__tests__/text/bof-whitespace-1.lint-test
--- a/src/lint/linter/__tests__/text/bof-whitespace-1.lint-test
+++ b/src/lint/linter/__tests__/text/bof-whitespace-1.lint-test
@@ -4,6 +4,6 @@
The quick brown fox jumps over the lazy dog.
~~~~~~~~~~
-autofix:1:1
+autofix:1:1;TXT8
~~~~~~~~~~
The quick brown fox jumps over the lazy dog.
diff --git a/src/lint/linter/__tests__/text/dos-newline.lint-test b/src/lint/linter/__tests__/text/dos-newline.lint-test
--- a/src/lint/linter/__tests__/text/dos-newline.lint-test
+++ b/src/lint/linter/__tests__/text/dos-newline.lint-test
@@ -1,7 +1,7 @@
The quick brown fox
jumps over the lazy dog.
~~~~~~~~~~
-error:1:1
+error:1:1:TXT1
~~~~~~~~~~
The quick brown fox
jumps over the lazy dog.
diff --git a/src/lint/linter/__tests__/text/eof-whitespace.lint-test b/src/lint/linter/__tests__/text/eof-whitespace.lint-test
--- a/src/lint/linter/__tests__/text/eof-whitespace.lint-test
+++ b/src/lint/linter/__tests__/text/eof-whitespace.lint-test
@@ -4,6 +4,6 @@
~~~~~~~~~~
-autofix:2:1
+autofix:2:1:TXT9
~~~~~~~~~~
The quick brown fox jumps over the lazy dog.
diff --git a/src/lint/linter/__tests__/text/line-wrap.lint-test b/src/lint/linter/__tests__/text/line-wrap.lint-test
--- a/src/lint/linter/__tests__/text/line-wrap.lint-test
+++ b/src/lint/linter/__tests__/text/line-wrap.lint-test
@@ -1,6 +1,6 @@
The quick brown fox jumps over the lazy dog.
~~~~~~~~~~
-warning:1:1
+warning:1:1:TXT3
~~~~~~~~~~
~~~~~~~~~~
{"config": {"text.max-line-length": 40}}
diff --git a/src/lint/linter/__tests__/text/trailing-whitespace.lint-test b/src/lint/linter/__tests__/text/trailing-whitespace.lint-test
--- a/src/lint/linter/__tests__/text/trailing-whitespace.lint-test
+++ b/src/lint/linter/__tests__/text/trailing-whitespace.lint-test
@@ -1,8 +1,8 @@
The quick brown fox
jumps over the lazy dog.
~~~~~~~~~~
-autofix:1:20
-autofix:2:25
+autofix:1:20:TXT6
+autofix:2:25:TXT6
~~~~~~~~~~
The quick brown fox
jumps over the lazy dog.
diff --git a/src/lint/linter/__tests__/xhpast/alias-functions.lint-test b/src/lint/linter/__tests__/xhpast/alias-functions.lint-test
--- a/src/lint/linter/__tests__/xhpast/alias-functions.lint-test
+++ b/src/lint/linter/__tests__/xhpast/alias-functions.lint-test
@@ -5,9 +5,10 @@
die();
sizeOf($x); // fixme
~~~~~~~~~~
-advice:4:1
-advice:5:1
-advice:6:1
+advice:4:1:XHP65
+advice:5:1:XHP65
+advice:6:1:XHP61
+advice:6:1:XHP65
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/__tests__/xhpast/array-comma.lint-test b/src/lint/linter/__tests__/xhpast/array-comma.lint-test
--- a/src/lint/linter/__tests__/xhpast/array-comma.lint-test
+++ b/src/lint/linter/__tests__/xhpast/array-comma.lint-test
@@ -33,12 +33,12 @@
2,
3, /* comment */ );
~~~~~~~~~~
-advice:3:14
-advice:12:3
-advice:16:3
-advice:26:3
-advice:30:3
-advice:34:20
+advice:3:14:XHP48
+advice:12:3:XHP48
+advice:16:3:XHP48
+advice:26:3:XHP48
+advice:30:3:XHP48
+advice:34:20:XHP48
~~~~~~~~~~
<?php
array(1, 2, 3);
diff --git a/src/lint/linter/__tests__/xhpast/array-index.lint-test b/src/lint/linter/__tests__/xhpast/array-index.lint-test
--- a/src/lint/linter/__tests__/xhpast/array-index.lint-test
+++ b/src/lint/linter/__tests__/xhpast/array-index.lint-test
@@ -4,10 +4,10 @@
$a[]=1;
$a [] = 1;
~~~~~~~~~~
-warning:2:3
-warning:2:6
-warning:4:5
-warning:5:3
+warning:2:3:XHP28
+warning:2:6:XHP27
+warning:4:5:XHP27
+warning:5:3:XHP28
~~~~~~~~~~
<?php
$a[] = 1;
diff --git a/src/lint/linter/__tests__/xhpast/blacklisted.lint-test b/src/lint/linter/__tests__/xhpast/blacklisted.lint-test
--- a/src/lint/linter/__tests__/xhpast/blacklisted.lint-test
+++ b/src/lint/linter/__tests__/xhpast/blacklisted.lint-test
@@ -1,7 +1,7 @@
<?php
eval('evil code');
~~~~~~~~~~
-error:2:1
+error:2:1:XHP51
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/__tests__/xhpast/call-parens-hug-closing.lint-test b/src/lint/linter/__tests__/xhpast/call-parens-hug-closing.lint-test
--- a/src/lint/linter/__tests__/xhpast/call-parens-hug-closing.lint-test
+++ b/src/lint/linter/__tests__/xhpast/call-parens-hug-closing.lint-test
@@ -17,8 +17,8 @@
EODOC
);
~~~~~~~~~~
-warning:4:4
-warning:9:4
+warning:4:4:XHP37
+warning:9:4:XHP37
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/__tests__/xhpast/call-time-pass-by-reference.lint-test b/src/lint/linter/__tests__/xhpast/call-time-pass-by-reference.lint-test
--- a/src/lint/linter/__tests__/xhpast/call-time-pass-by-reference.lint-test
+++ b/src/lint/linter/__tests__/xhpast/call-time-pass-by-reference.lint-test
@@ -24,10 +24,10 @@
array_walk(array(), function() use (&$x) {});
MyClass::myfunc(array(&$x, &$y));
~~~~~~~~~~
-error:2:7 XHP19
-error:9:8
-error:12:15
-error:15:17
-error:18:24
-error:18:39
-error:22:6
+error:2:7:XHP19
+error:9:8:XHP53
+error:12:15:XHP53
+error:15:17:XHP53
+error:18:24:XHP53
+error:18:39:XHP53
+error:22:6:XHP53
diff --git a/src/lint/linter/__tests__/xhpast/cast-spacing.lint-test b/src/lint/linter/__tests__/xhpast/cast-spacing.lint-test
--- a/src/lint/linter/__tests__/xhpast/cast-spacing.lint-test
+++ b/src/lint/linter/__tests__/xhpast/cast-spacing.lint-test
@@ -3,8 +3,8 @@
echo (int) 1;
echo (string) 2;
~~~~~~~~~~
-advice:3:11
-advice:4:14
+advice:3:11:XHP66
+advice:4:14:XHP66
~~~~~~~~~~
<?php
echo (double)0;
diff --git a/src/lint/linter/__tests__/xhpast/class-name-literal.lint-test b/src/lint/linter/__tests__/xhpast/class-name-literal.lint-test
--- a/src/lint/linter/__tests__/xhpast/class-name-literal.lint-test
+++ b/src/lint/linter/__tests__/xhpast/class-name-literal.lint-test
@@ -11,9 +11,9 @@
}
}
~~~~~~~~~~
-error:2:7
-advice:4:12
-advice:8:10
+error:2:7:XHP19
+advice:4:12:XHP62
+advice:8:10:XHP62
~~~~~~~~~~
<?php
class MyClass {
diff --git a/src/lint/linter/__tests__/xhpast/conditional-usage.lint-test b/src/lint/linter/__tests__/xhpast/conditional-usage.lint-test
--- a/src/lint/linter/__tests__/xhpast/conditional-usage.lint-test
+++ b/src/lint/linter/__tests__/xhpast/conditional-usage.lint-test
@@ -20,10 +20,10 @@
$var = 'some_func';
if ($var()) {}
~~~~~~~~~~
-error:5:3
-error:7:3
-error:12:7
-warning:16:3
+error:5:3:XHP45
+error:7:3:XHP45
+error:12:7:XHP45
+warning:16:3:XHP24
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/__tests__/xhpast/constant-case.lint-test b/src/lint/linter/__tests__/xhpast/constant-case.lint-test
--- a/src/lint/linter/__tests__/xhpast/constant-case.lint-test
+++ b/src/lint/linter/__tests__/xhpast/constant-case.lint-test
@@ -6,7 +6,7 @@
const bar = 'baz';
}
~~~~~~~~~~
-warning:2:8
-warning:3:7
-error:5:7
-warning:6:9
+warning:2:8:XHP9
+warning:3:7:XHP9
+error:5:7:XHP19
+warning:6:9:XHP9
diff --git a/src/lint/linter/__tests__/xhpast/constructor-parentheses.lint-test b/src/lint/linter/__tests__/xhpast/constructor-parentheses.lint-test
--- a/src/lint/linter/__tests__/xhpast/constructor-parentheses.lint-test
+++ b/src/lint/linter/__tests__/xhpast/constructor-parentheses.lint-test
@@ -3,8 +3,8 @@
new Bar();
new Foo\Bar;
~~~~~~~~~~
-advice:2:5
-advice:4:5
+advice:2:5:XHP49
+advice:4:5:XHP49
~~~~~~~~~~
<?php
new Foo();
diff --git a/src/lint/linter/__tests__/xhpast/creative-brace-use.lint-test b/src/lint/linter/__tests__/xhpast/creative-brace-use.lint-test
--- a/src/lint/linter/__tests__/xhpast/creative-brace-use.lint-test
+++ b/src/lint/linter/__tests__/xhpast/creative-brace-use.lint-test
@@ -37,21 +37,21 @@
declare(ticks = 1);
~~~~~~~~~~
-advice:3:14
-warning:7:13
-advice:8:1
-warning:12:7
-warning:15:20
-warning:18:10
-warning:21:11
-warning:24:4
-warning:26:21
-warning:29:13
-warning:30:9
-warning:31:6
-warning:32:4
-warning:34:11
-warning:35:16
+advice:3:14:XHP47
+warning:7:13:XHP24
+advice:8:1:XHP47
+warning:12:7:XHP24
+warning:15:20:XHP24
+warning:18:10:XHP24
+warning:21:11:XHP24
+warning:24:4:XHP24
+warning:26:21:XHP24
+warning:29:13:XHP24
+warning:30:9:XHP24
+warning:31:6:XHP24
+warning:32:4:XHP24
+warning:34:11:XHP24
+warning:35:16:XHP24
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/__tests__/xhpast/decl-parens-hug-closing.lint-test b/src/lint/linter/__tests__/xhpast/decl-parens-hug-closing.lint-test
--- a/src/lint/linter/__tests__/xhpast/decl-parens-hug-closing.lint-test
+++ b/src/lint/linter/__tests__/xhpast/decl-parens-hug-closing.lint-test
@@ -23,14 +23,14 @@
f(function($x ) {});
f(function($x ) use ($z) {});
~~~~~~~~~~
-warning:4:14
-warning:7:15
-error:9:13
-warning:12:23
-warning:15:31
-warning:18:33
-warning:23:14
-warning:24:14
+warning:4:14:XHP38
+warning:7:15:XHP38
+error:9:13:XHP19
+warning:12:23:XHP38
+warning:15:31:XHP38
+warning:18:33:XHP38
+warning:23:14:XHP38
+warning:24:14:XHP38
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/__tests__/xhpast/default-parameters.lint-test b/src/lint/linter/__tests__/xhpast/default-parameters.lint-test
--- a/src/lint/linter/__tests__/xhpast/default-parameters.lint-test
+++ b/src/lint/linter/__tests__/xhpast/default-parameters.lint-test
@@ -7,6 +7,6 @@
public function myMethod($x, $y = null, $z) {}
}
~~~~~~~~~~
-warning:3:13
-error:6:7
-warning:7:27
+warning:3:13:XHP60
+error:6:7:XHP19
+warning:7:27:XHP60
diff --git a/src/lint/linter/__tests__/xhpast/double-quote.lint-test b/src/lint/linter/__tests__/xhpast/double-quote.lint-test
--- a/src/lint/linter/__tests__/xhpast/double-quote.lint-test
+++ b/src/lint/linter/__tests__/xhpast/double-quote.lint-test
@@ -12,7 +12,7 @@
"This string also requires \123\345 double quotes, but ".
"this string does not. Here, they are used for consistency.");
~~~~~~~~~~
-advice:3:1
+advice:3:1:XHP41
~~~~~~~~~~
<?php
'foobar';
diff --git a/src/lint/linter/__tests__/xhpast/duplicate-key-in-array.lint-test b/src/lint/linter/__tests__/xhpast/duplicate-key-in-array.lint-test
--- a/src/lint/linter/__tests__/xhpast/duplicate-key-in-array.lint-test
+++ b/src/lint/linter/__tests__/xhpast/duplicate-key-in-array.lint-test
@@ -34,9 +34,9 @@
$a => 'var2',
);
~~~~~~~~~~
-error:5:3
-error:8:3
-error:15:3
-error:20:3
-error:25:3
-error:34:3
+error:5:3:XHP22
+error:8:3:XHP22
+error:15:3:XHP22
+error:20:3:XHP22
+error:25:3:XHP22
+error:34:3:XHP22
diff --git a/src/lint/linter/__tests__/xhpast/duplicate-switch-case.lint-test b/src/lint/linter/__tests__/xhpast/duplicate-switch-case.lint-test
--- a/src/lint/linter/__tests__/xhpast/duplicate-switch-case.lint-test
+++ b/src/lint/linter/__tests__/xhpast/duplicate-switch-case.lint-test
@@ -24,5 +24,5 @@
break;
}
~~~~~~~~~~
-error:15:3
-error:22:7
+error:15:3:XHP50
+error:22:7:XHP50
diff --git a/src/lint/linter/__tests__/xhpast/dynamic-define.lint-test b/src/lint/linter/__tests__/xhpast/dynamic-define.lint-test
--- a/src/lint/linter/__tests__/xhpast/dynamic-define.lint-test
+++ b/src/lint/linter/__tests__/xhpast/dynamic-define.lint-test
@@ -4,5 +4,5 @@
define('PONY', $cute);
define($pony, $cute);
~~~~~~~~~~
-error:3:8 dynamic define
-error:5:8 dynamic define
+error:3:8:XHP12
+error:5:8:XHP12
diff --git a/src/lint/linter/__tests__/xhpast/elseif.lint-test b/src/lint/linter/__tests__/xhpast/elseif.lint-test
--- a/src/lint/linter/__tests__/xhpast/elseif.lint-test
+++ b/src/lint/linter/__tests__/xhpast/elseif.lint-test
@@ -7,7 +7,7 @@
echo 'baz';
}
~~~~~~~~~~
-advice:4:3
+advice:4:3:XHP42
~~~~~~~~~~
<?php
if (true) {
diff --git a/src/lint/linter/__tests__/xhpast/embedded-tags.lint-test b/src/lint/linter/__tests__/xhpast/embedded-tags.lint-test
--- a/src/lint/linter/__tests__/xhpast/embedded-tags.lint-test
+++ b/src/lint/linter/__tests__/xhpast/embedded-tags.lint-test
@@ -2,4 +2,4 @@
This shouldn't fatal the parser.
~~~~~~~~~~
-error:1:10
+error:1:10:XHP8
diff --git a/src/lint/linter/__tests__/xhpast/empty-block-statement.lint-test b/src/lint/linter/__tests__/xhpast/empty-block-statement.lint-test
--- a/src/lint/linter/__tests__/xhpast/empty-block-statement.lint-test
+++ b/src/lint/linter/__tests__/xhpast/empty-block-statement.lint-test
@@ -9,8 +9,8 @@
}
~~~~~~~~~~
-advice:6:14
-advice:7:14
+advice:6:14:XHP47
+advice:7:14:XHP47
~~~~~~~~~~
<?php
function w() {}
diff --git a/src/lint/linter/__tests__/xhpast/empty-statement.lint-test b/src/lint/linter/__tests__/xhpast/empty-statement.lint-test
--- a/src/lint/linter/__tests__/xhpast/empty-statement.lint-test
+++ b/src/lint/linter/__tests__/xhpast/empty-statement.lint-test
@@ -2,9 +2,9 @@
final class Foo {};
$x = null;;
~~~~~~~~~~
-error:2:13 XHP19
-advice:2:19
-advice:3:11
+error:2:13:XHP19
+advice:2:19:XHP56
+advice:3:11:XHP56
~~~~~~~~~~
<?php
final class Foo {}
diff --git a/src/lint/linter/__tests__/xhpast/exit-expression.lint-test b/src/lint/linter/__tests__/xhpast/exit-expression.lint-test
--- a/src/lint/linter/__tests__/xhpast/exit-expression.lint-test
+++ b/src/lint/linter/__tests__/xhpast/exit-expression.lint-test
@@ -3,6 +3,6 @@
exit -1;
strtoupper(33 * exit - 6);
~~~~~~~~~~
-error:3:1
-warning:3:6
-error:4:17
+error:3:1:XHP17
+warning:3:6:XHP27
+error:4:17:XHP17
diff --git a/src/lint/linter/__tests__/xhpast/formatted-string.lint-test b/src/lint/linter/__tests__/xhpast/formatted-string.lint-test
--- a/src/lint/linter/__tests__/xhpast/formatted-string.lint-test
+++ b/src/lint/linter/__tests__/xhpast/formatted-string.lint-test
@@ -11,11 +11,11 @@
foobar(null, null, '%s');
~~~~~~~~~~
-error:2:1
-error:6:1
-error:7:1
-error:10:1
-error:12:1
+error:2:1:XHP54
+error:6:1:XHP54
+error:7:1:XHP54
+error:10:1:XHP54
+error:12:1:XHP54
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/__tests__/xhpast/hash-comments.lint-test b/src/lint/linter/__tests__/xhpast/hash-comments.lint-test
--- a/src/lint/linter/__tests__/xhpast/hash-comments.lint-test
+++ b/src/lint/linter/__tests__/xhpast/hash-comments.lint-test
@@ -20,15 +20,15 @@
/** yes */
/**** yes ****/
~~~~~~~~~~
-error:2:1
-error:3:1
-error:5:1
-error:6:11
-advice:13:1
-advice:14:1
-error:15:1
-advice:18:1
-advice:19:1
+error:2:1:XHP18
+error:3:1:XHP18
+error:5:1:XHP18
+error:6:11:XHP18
+advice:13:1:XHP34
+advice:14:1:XHP34
+error:15:1:XHP18
+advice:18:1:XHP34
+advice:19:1:XHP34
~~~~~~~~~~
<?php
// no
diff --git a/src/lint/linter/__tests__/xhpast/implicit-visibility.lint-test b/src/lint/linter/__tests__/xhpast/implicit-visibility.lint-test
--- a/src/lint/linter/__tests__/xhpast/implicit-visibility.lint-test
+++ b/src/lint/linter/__tests__/xhpast/implicit-visibility.lint-test
@@ -10,11 +10,11 @@
private $z;
}
~~~~~~~~~~
-error:2:13 XHP19
-advice:4:3
-advice:5:3
-advice:8:3
-advice:9:3
+error:2:13:XHP19
+advice:4:3:XHP52
+advice:5:3:XHP52
+advice:8:3:XHP52
+advice:9:3:XHP52
~~~~~~~~~~
<?php
final class Foo {
diff --git a/src/lint/linter/__tests__/xhpast/index-function.lint-test b/src/lint/linter/__tests__/xhpast/index-function.lint-test
--- a/src/lint/linter/__tests__/xhpast/index-function.lint-test
+++ b/src/lint/linter/__tests__/xhpast/index-function.lint-test
@@ -1,7 +1,7 @@
<?php
f()[0];
~~~~~~~~~~
-error:2:5
+error:2:5:XHP45
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/__tests__/xhpast/inner-function.lint-test b/src/lint/linter/__tests__/xhpast/inner-function.lint-test
--- a/src/lint/linter/__tests__/xhpast/inner-function.lint-test
+++ b/src/lint/linter/__tests__/xhpast/inner-function.lint-test
@@ -11,4 +11,4 @@
function() {};
}
~~~~~~~~~~
-warning:5:5
+warning:5:5:XHP59
diff --git a/src/lint/linter/__tests__/xhpast/instanceof-operator.lint-test b/src/lint/linter/__tests__/xhpast/instanceof-operator.lint-test
--- a/src/lint/linter/__tests__/xhpast/instanceof-operator.lint-test
+++ b/src/lint/linter/__tests__/xhpast/instanceof-operator.lint-test
@@ -4,6 +4,6 @@
var_dump(null instanceof stdClass);
var_dump($x instanceof stdClass);
~~~~~~~~~~
-error:2:10
-error:3:10
-error:4:10
+error:2:10:XHP69
+error:3:10:XHP69
+error:4:10:XHP69
diff --git a/src/lint/linter/__tests__/xhpast/invalid-default-paramter.lint-test b/src/lint/linter/__tests__/xhpast/invalid-default-paramter.lint-test
--- a/src/lint/linter/__tests__/xhpast/invalid-default-paramter.lint-test
+++ b/src/lint/linter/__tests__/xhpast/invalid-default-paramter.lint-test
@@ -12,6 +12,6 @@
function func_nine(stdClass $x = null) {}
function func_ten(stdClass $x = array()) {}
~~~~~~~~~~
-error:5:31
-error:9:35
-error:13:33
+error:5:31:XHP70
+error:9:35:XHP70
+error:13:33:XHP70
diff --git a/src/lint/linter/__tests__/xhpast/invalid-modifiers.lint-test b/src/lint/linter/__tests__/xhpast/invalid-modifiers.lint-test
--- a/src/lint/linter/__tests__/xhpast/invalid-modifiers.lint-test
+++ b/src/lint/linter/__tests__/xhpast/invalid-modifiers.lint-test
@@ -10,9 +10,9 @@
abstract final public function baz() {}
}
~~~~~~~~~~
-error:2:7 XHP19
-error:4:10
-error:5:10
-error:6:11
-error:9:10
-error:10:12
+error:2:7:XHP19
+error:4:10:XHP72
+error:5:10:XHP72
+error:6:11:XHP72
+error:9:10:XHP72
+error:10:12:XHP72
diff --git a/src/lint/linter/__tests__/xhpast/keyword-casing.lint-test b/src/lint/linter/__tests__/xhpast/keyword-casing.lint-test
--- a/src/lint/linter/__tests__/xhpast/keyword-casing.lint-test
+++ b/src/lint/linter/__tests__/xhpast/keyword-casing.lint-test
@@ -17,14 +17,14 @@
echo __file__;
~~~~~~~~~~
-warning:6:1
-warning:7:1
-warning:8:1
-warning:9:1
-warning:11:1
-warning:13:22
-warning:16:1
-warning:18:6
+warning:6:1:XHP40
+warning:7:1:XHP40
+warning:8:1:XHP40
+warning:9:1:XHP40
+warning:11:1:XHP40
+warning:13:22:XHP40
+warning:16:1:XHP40
+warning:18:6:XHP40
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/__tests__/xhpast/lamba-func-function.lint-test b/src/lint/linter/__tests__/xhpast/lamba-func-function.lint-test
--- a/src/lint/linter/__tests__/xhpast/lamba-func-function.lint-test
+++ b/src/lint/linter/__tests__/xhpast/lamba-func-function.lint-test
@@ -1,4 +1,4 @@
<?php
function __lambda_func() {}
~~~~~~~~~~
-error:2:1
+error:2:1:XHP68
diff --git a/src/lint/linter/__tests__/xhpast/language-construct-parentheses.lint-test b/src/lint/linter/__tests__/xhpast/language-construct-parentheses.lint-test
--- a/src/lint/linter/__tests__/xhpast/language-construct-parentheses.lint-test
+++ b/src/lint/linter/__tests__/xhpast/language-construct-parentheses.lint-test
@@ -17,16 +17,16 @@
require_once ('baz.php');
echo ('baz');
~~~~~~~~~~
-warning:8:8
-warning:9:13
-warning:10:8
-warning:11:13
-warning:12:5
-warning:14:9
-warning:15:14
-warning:16:9
-warning:17:14
-warning:18:6
+warning:8:8:XHP46
+warning:9:13:XHP46
+warning:10:8:XHP46
+warning:11:13:XHP46
+warning:12:5:XHP46
+warning:14:9:XHP46
+warning:15:14:XHP46
+warning:16:9:XHP46
+warning:17:14:XHP46
+warning:18:6:XHP46
~~~~~~~~~~
<?php
include 'foo.php';
diff --git a/src/lint/linter/__tests__/xhpast/logical-operators.lint-test b/src/lint/linter/__tests__/xhpast/logical-operators.lint-test
--- a/src/lint/linter/__tests__/xhpast/logical-operators.lint-test
+++ b/src/lint/linter/__tests__/xhpast/logical-operators.lint-test
@@ -8,8 +8,8 @@
$x or $y;
$x || $y;
~~~~~~~~~~
-advice:6:4
-advice:8:4
+advice:6:4:XHP58
+advice:8:4:XHP58
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/__tests__/xhpast/lowercase-functions.lint-test b/src/lint/linter/__tests__/xhpast/lowercase-functions.lint-test
--- a/src/lint/linter/__tests__/xhpast/lowercase-functions.lint-test
+++ b/src/lint/linter/__tests__/xhpast/lowercase-functions.lint-test
@@ -2,7 +2,7 @@
var_dump('');
Var_Dump('');
~~~~~~~~~~
-advice:3:1
+advice:3:1:XHP61
~~~~~~~~~~
<?php
var_dump('');
diff --git a/src/lint/linter/__tests__/xhpast/modifier-ordering.lint-test b/src/lint/linter/__tests__/xhpast/modifier-ordering.lint-test
--- a/src/lint/linter/__tests__/xhpast/modifier-ordering.lint-test
+++ b/src/lint/linter/__tests__/xhpast/modifier-ordering.lint-test
@@ -8,10 +8,10 @@
static final public function foobar() {}
}
~~~~~~~~~~
-error:2:7 XHP19
-advice:4:3
-advice:6:3
-advice:8:3
+error:2:7:XHP19
+advice:4:3:XHP71
+advice:6:3:XHP71
+advice:8:3:XHP71
~~~~~~~~~~
<?php
class Foo {
diff --git a/src/lint/linter/__tests__/xhpast/naming-conventions.lint-test b/src/lint/linter/__tests__/xhpast/naming-conventions.lint-test
--- a/src/lint/linter/__tests__/xhpast/naming-conventions.lint-test
+++ b/src/lint/linter/__tests__/xhpast/naming-conventions.lint-test
@@ -56,20 +56,20 @@
}
~~~~~~~~~~
-warning:2:13
-warning:3:9
-warning:3:16
-warning:4:13
-warning:4:17
-warning:5:19
-warning:5:21
-warning:5:25
-warning:8:11
-warning:12:10
-warning:12:13
-warning:26:13
-warning:29:3
-warning:30:3
-warning:31:3
-warning:33:3
-warning:55:3
+warning:2:13:XHP9
+warning:3:9:XHP9
+warning:3:16:XHP9
+warning:4:13:XHP9
+warning:4:17:XHP9
+warning:5:19:XHP9
+warning:5:21:XHP9
+warning:5:25:XHP9
+warning:8:11:XHP9
+warning:12:10:XHP9
+warning:12:13:XHP9
+warning:26:13:XHP9
+warning:29:3:XHP9
+warning:30:3:XHP9
+warning:31:3:XHP9
+warning:33:3:XHP9
+warning:55:3:XHP9
diff --git a/src/lint/linter/__tests__/xhpast/no-parent-scope.lint-test b/src/lint/linter/__tests__/xhpast/no-parent-scope.lint-test
--- a/src/lint/linter/__tests__/xhpast/no-parent-scope.lint-test
+++ b/src/lint/linter/__tests__/xhpast/no-parent-scope.lint-test
@@ -16,4 +16,4 @@
}
}
~~~~~~~~~~
-error:11:5
+error:11:5:XHP64
diff --git a/src/lint/linter/__tests__/xhpast/nowdoc.lint-test b/src/lint/linter/__tests__/xhpast/nowdoc.lint-test
--- a/src/lint/linter/__tests__/xhpast/nowdoc.lint-test
+++ b/src/lint/linter/__tests__/xhpast/nowdoc.lint-test
@@ -3,7 +3,7 @@
Hello World!
EOT;
~~~~~~~~~~
-error:2:6
+error:2:6:XHP45
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/__tests__/xhpast/parens-hug-contents.lint-test b/src/lint/linter/__tests__/xhpast/parens-hug-contents.lint-test
--- a/src/lint/linter/__tests__/xhpast/parens-hug-contents.lint-test
+++ b/src/lint/linter/__tests__/xhpast/parens-hug-contents.lint-test
@@ -20,23 +20,27 @@
$a // if comments are present
);
~~~~~~~~~~
-warning:2:5
-warning:2:8
-warning:3:3
-warning:4:3
-warning:6:21
-warning:6:24
-warning:12:6
-warning:12:30
-warning:13:10
-warning:13:19
-warning:14:12
-warning:14:15
-error:15:13 XHP19 Class-Filename Mismatch
-warning:16:21
-warning:16:24
-warning:18:10
-warning:18:25
+warning:2:5:XHP25
+warning:2:8:XHP25
+warning:3:3:XHP25
+warning:3:3:XHP37
+warning:4:3:XHP25
+warning:4:3:XHP37
+warning:6:21:XHP25
+warning:6:24:XHP25
+warning:12:6:XHP25
+warning:12:30:XHP25
+warning:13:10:XHP25
+warning:13:19:XHP25
+warning:14:12:XHP25
+warning:14:15:XHP25
+warning:14:15:XHP38
+error:15:13:XHP19
+warning:16:21:XHP25
+warning:16:24:XHP25
+warning:16:24:XHP38
+warning:18:10:XHP25
+warning:18:25:XHP25
~~~~~~~~~~
<?php
if ($x) {}
diff --git a/src/lint/linter/__tests__/xhpast/php-compatibility.lint-test b/src/lint/linter/__tests__/xhpast/php-compatibility.lint-test
--- a/src/lint/linter/__tests__/xhpast/php-compatibility.lint-test
+++ b/src/lint/linter/__tests__/xhpast/php-compatibility.lint-test
@@ -3,8 +3,8 @@
define_syslog_variables();
var_dump(STREAM_ENFORCE_SAFE_MODE);
~~~~~~~~~~
-error:3:1
-error:4:10
+error:3:1:XHP45
+error:4:10:XHP45
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/__tests__/xhpast/php-tags-bad.lint-test b/src/lint/linter/__tests__/xhpast/php-tags-bad.lint-test
--- a/src/lint/linter/__tests__/xhpast/php-tags-bad.lint-test
+++ b/src/lint/linter/__tests__/xhpast/php-tags-bad.lint-test
@@ -3,8 +3,8 @@
?>
~~~~~~~~~~
-error:1:1
-error:4:1
+error:1:1:XHP15
+error:4:1:XHP8
~~~~~~~~~~
garbage garbage
<?php
diff --git a/src/lint/linter/__tests__/xhpast/php-tags-echo-form.lint-test b/src/lint/linter/__tests__/xhpast/php-tags-echo-form.lint-test
--- a/src/lint/linter/__tests__/xhpast/php-tags-echo-form.lint-test
+++ b/src/lint/linter/__tests__/xhpast/php-tags-echo-form.lint-test
@@ -1,4 +1,4 @@
<?=
~~~~~~~~~~
-error:1:1
+error:1:1:XHP7
diff --git a/src/lint/linter/__tests__/xhpast/php-tags-short.lint-test b/src/lint/linter/__tests__/xhpast/php-tags-short.lint-test
--- a/src/lint/linter/__tests__/xhpast/php-tags-short.lint-test
+++ b/src/lint/linter/__tests__/xhpast/php-tags-short.lint-test
@@ -1,7 +1,7 @@
<?
~~~~~~~~~~
-error:1:1
+error:1:1:XHP6
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/__tests__/xhpast/php53-features.lint-test b/src/lint/linter/__tests__/xhpast/php53-features.lint-test
--- a/src/lint/linter/__tests__/xhpast/php53-features.lint-test
+++ b/src/lint/linter/__tests__/xhpast/php53-features.lint-test
@@ -12,14 +12,14 @@
$a::m();
echo __DIR__;
~~~~~~~~~~
-error:3:1
-error:4:5
-error:5:3
-error:6:3
-error:7:3
-error:8:1
-error:10:1
-error:13:6
+error:3:1:XHP45
+error:4:5:XHP45
+error:5:3:XHP45
+error:6:3:XHP45
+error:7:3:XHP45
+error:8:1:XHP45
+error:10:1:XHP45
+error:13:6:XHP45
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/__tests__/xhpast/php54-features.lint-test b/src/lint/linter/__tests__/xhpast/php54-features.lint-test
--- a/src/lint/linter/__tests__/xhpast/php54-features.lint-test
+++ b/src/lint/linter/__tests__/xhpast/php54-features.lint-test
@@ -7,8 +7,8 @@
// $o->m()[0];
~~~~~~~~~~
-error:3:5
-error:4:9
+error:3:5:XHP45
+error:4:9:XHP45
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/__tests__/xhpast/php54-incompat.lint-test b/src/lint/linter/__tests__/xhpast/php54-incompat.lint-test
--- a/src/lint/linter/__tests__/xhpast/php54-incompat.lint-test
+++ b/src/lint/linter/__tests__/xhpast/php54-incompat.lint-test
@@ -8,10 +8,10 @@
continue 1;
continue 1 + foo() * $bar;
~~~~~~~~~~
-error:3:7
-error:5:7
-error:7:10
-error:9:10
+error:3:7:XHP45
+error:5:7:XHP45
+error:7:10:XHP45
+error:9:10:XHP45
~~~~~~~~~~
~~~~~~~~~~
{"config": {"xhpast.php-version": "5.4.0"}}
diff --git a/src/lint/linter/__tests__/xhpast/preg-quote.lint-test b/src/lint/linter/__tests__/xhpast/preg-quote.lint-test
--- a/src/lint/linter/__tests__/xhpast/preg-quote.lint-test
+++ b/src/lint/linter/__tests__/xhpast/preg-quote.lint-test
@@ -8,5 +8,6 @@
}
~~~~~~~~~~
-advice:4:3 Wrong number of arguments to preg_quote()
-advice:6:3 Wrong number of arguments to preg_quote()
+advice:4:3:XHP14
+advice:6:3:XHP14
+advice:6:3:XHP61
diff --git a/src/lint/linter/__tests__/xhpast/reused-iterator-reference.lint-test b/src/lint/linter/__tests__/xhpast/reused-iterator-reference.lint-test
--- a/src/lint/linter/__tests__/xhpast/reused-iterator-reference.lint-test
+++ b/src/lint/linter/__tests__/xhpast/reused-iterator-reference.lint-test
@@ -121,13 +121,13 @@
}
~~~~~~~~~~
-warning:6:3
-warning:12:8
-warning:18:10
-warning:27:20
-warning:33:3
-warning:52:3
-error:85:20
-error:87:3
-warning:110:5
-warning:120:3
+warning:6:3:XHP39
+warning:12:8:XHP39
+warning:18:10:XHP39
+warning:27:20:XHP39
+warning:33:3:XHP39
+warning:52:3:XHP39
+error:85:20:XHP3
+error:87:3:XHP3
+warning:110:5:XHP39
+warning:120:3:XHP39
diff --git a/src/lint/linter/__tests__/xhpast/reused-iterators.lint-test b/src/lint/linter/__tests__/xhpast/reused-iterators.lint-test
--- a/src/lint/linter/__tests__/xhpast/reused-iterators.lint-test
+++ b/src/lint/linter/__tests__/xhpast/reused-iterators.lint-test
@@ -50,9 +50,9 @@
}
}
~~~~~~~~~~
-error:4:11
-error:10:11
-error:16:11
-error:22:11
-error:36:7
-error:48:7
+error:4:11:XHP23
+error:10:11:XHP23
+error:16:11:XHP23
+error:22:11:XHP23
+error:36:7:XHP23
+error:48:7:XHP23
diff --git a/src/lint/linter/__tests__/xhpast/reused-local.lint-test b/src/lint/linter/__tests__/xhpast/reused-local.lint-test
--- a/src/lint/linter/__tests__/xhpast/reused-local.lint-test
+++ b/src/lint/linter/__tests__/xhpast/reused-local.lint-test
@@ -64,5 +64,5 @@
}
~~~~~~~~~~
-error:43:22
-error:53:22
+error:43:22:XHP32
+error:53:22:XHP32
diff --git a/src/lint/linter/__tests__/xhpast/self-member-references.lint-test b/src/lint/linter/__tests__/xhpast/self-member-references.lint-test
--- a/src/lint/linter/__tests__/xhpast/self-member-references.lint-test
+++ b/src/lint/linter/__tests__/xhpast/self-member-references.lint-test
@@ -25,14 +25,14 @@
SomeReallyLongClassName
::someMethod();
~~~~~~~~~~
-error:3:7
-advice:7:5
-advice:12:10
-advice:12:14
-advice:12:17
-advice:17:10
-advice:23:8
-advice:23:11
+error:3:7:XHP19
+advice:7:5:XHP57
+advice:12:10:XHP57
+advice:12:14:XHP57
+advice:12:17:XHP57
+advice:17:10:XHP57
+advice:23:8:XHP57
+advice:23:11:XHP57
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/__tests__/xhpast/semicolon-spacing.lint-test b/src/lint/linter/__tests__/xhpast/semicolon-spacing.lint-test
--- a/src/lint/linter/__tests__/xhpast/semicolon-spacing.lint-test
+++ b/src/lint/linter/__tests__/xhpast/semicolon-spacing.lint-test
@@ -5,8 +5,8 @@
;
~~~~~~~~~~
-advice:3:6
-advice:4:6
+advice:3:6:XHP43
+advice:4:6:XHP43
~~~~~~~~~~
<?php
foo();
diff --git a/src/lint/linter/__tests__/xhpast/slowness.lint-test b/src/lint/linter/__tests__/xhpast/slowness.lint-test
--- a/src/lint/linter/__tests__/xhpast/slowness.lint-test
+++ b/src/lint/linter/__tests__/xhpast/slowness.lint-test
@@ -8,7 +8,7 @@
(strstr('a', 'b') === false);
(strstr('a', 'b') === 'b');
~~~~~~~~~~
-warning:3:2
-warning:4:2
-warning:5:8
-warning:8:2
+warning:3:2:XHP36
+warning:4:2:XHP36
+warning:5:8:XHP36
+warning:8:2:XHP36
diff --git a/src/lint/linter/__tests__/xhpast/space-after-control-keywords.lint-test b/src/lint/linter/__tests__/xhpast/space-after-control-keywords.lint-test
--- a/src/lint/linter/__tests__/xhpast/space-after-control-keywords.lint-test
+++ b/src/lint/linter/__tests__/xhpast/space-after-control-keywords.lint-test
@@ -23,20 +23,20 @@
echo 1;
} while(true);
~~~~~~~~~~
-warning:2:1
-warning:2:10
-warning:3:1
-warning:4:1
-warning:5:1
-warning:6:1
-warning:7:1
-warning:7:6
-warning:8:1
-warning:9:11
-warning:10:16
-warning:13:3
-warning:14:3
-warning:24:3
+warning:2:1:XHP26
+warning:2:10:XHP24
+warning:3:1:XHP26
+warning:4:1:XHP26
+warning:5:1:XHP26
+warning:6:1:XHP26
+warning:7:1:XHP26
+warning:7:6:XHP26
+warning:8:1:XHP26
+warning:9:11:XHP24
+warning:10:16:XHP24
+warning:13:3:XHP26
+warning:14:3:XHP26
+warning:24:3:XHP26
~~~~~~~~~~
<?php
if ($x) {} else {}
diff --git a/src/lint/linter/__tests__/xhpast/space-around-more-operators.lint-test b/src/lint/linter/__tests__/xhpast/space-around-more-operators.lint-test
--- a/src/lint/linter/__tests__/xhpast/space-around-more-operators.lint-test
+++ b/src/lint/linter/__tests__/xhpast/space-around-more-operators.lint-test
@@ -24,14 +24,14 @@
$x=>$y,
);
~~~~~~~~~~
-warning:3:3
-warning:3:5
-warning:4:4
-warning:5:3
-warning:12:9
-warning:13:10
-warning:14:9
-warning:24:5
+warning:3:3:XHP44
+warning:3:5:XHP44
+warning:4:4:XHP44
+warning:5:3:XHP44
+warning:12:9:XHP27
+warning:13:10:XHP27
+warning:14:9:XHP27
+warning:24:5:XHP27
~~~~~~~~~~
<?php
$a.$b;
diff --git a/src/lint/linter/__tests__/xhpast/space-around-operators.lint-test b/src/lint/linter/__tests__/xhpast/space-around-operators.lint-test
--- a/src/lint/linter/__tests__/xhpast/space-around-operators.lint-test
+++ b/src/lint/linter/__tests__/xhpast/space-around-operators.lint-test
@@ -23,19 +23,19 @@
if ($x instanceof z && $w) {}
f(1,2);
~~~~~~~~~~
-warning:3:3
-warning:4:4
-warning:5:3
-warning:7:3
-warning:8:3
-warning:9:4
-warning:10:3
-warning:11:3
-warning:13:14
-warning:20:52
-warning:21:54
-warning:22:21
-warning:24:4
+warning:3:3:XHP27
+warning:4:4:XHP27
+warning:5:3:XHP27
+warning:7:3:XHP27
+warning:8:3:XHP27
+warning:9:4:XHP27
+warning:10:3:XHP27
+warning:11:3:XHP27
+warning:13:14:XHP27
+warning:20:52:XHP27
+warning:21:54:XHP27
+warning:22:21:XHP27
+warning:24:4:XHP27
~~~~~~~~~~
<?php
$a + $b;
diff --git a/src/lint/linter/__tests__/xhpast/surprising-constructors.lint-test b/src/lint/linter/__tests__/xhpast/surprising-constructors.lint-test
--- a/src/lint/linter/__tests__/xhpast/surprising-constructors.lint-test
+++ b/src/lint/linter/__tests__/xhpast/surprising-constructors.lint-test
@@ -5,5 +5,5 @@
}
}
~~~~~~~~~~
-error:2:13 XHP19 Class-Filename Mismatch
-error:3:19
+error:2:13:XHP19
+error:3:19:XHP10
diff --git a/src/lint/linter/__tests__/xhpast/switches.lint-test b/src/lint/linter/__tests__/xhpast/switches.lint-test
--- a/src/lint/linter/__tests__/xhpast/switches.lint-test
+++ b/src/lint/linter/__tests__/xhpast/switches.lint-test
@@ -84,13 +84,13 @@
throw_exception();
}
~~~~~~~~~~
-warning:41:3
-warning:48:3
-warning:53:3
-warning:57:3
-warning:66:3
-warning:71:3
-warning:75:3
+warning:41:3:XHP30
+warning:48:3:XHP30
+warning:53:3:XHP30
+warning:57:3:XHP30
+warning:66:3:XHP30
+warning:71:3:XHP30
+warning:75:3:XHP30
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/__tests__/xhpast/syntax-error.lint-test b/src/lint/linter/__tests__/xhpast/syntax-error.lint-test
--- a/src/lint/linter/__tests__/xhpast/syntax-error.lint-test
+++ b/src/lint/linter/__tests__/xhpast/syntax-error.lint-test
@@ -1,4 +1,4 @@
<?php
char *buf = null;
~~~~~~~~~~
-error:2:1
+error:2:1:XHP1
diff --git a/src/lint/linter/__tests__/xhpast/tautological-expressions.lint-test b/src/lint/linter/__tests__/xhpast/tautological-expressions.lint-test
--- a/src/lint/linter/__tests__/xhpast/tautological-expressions.lint-test
+++ b/src/lint/linter/__tests__/xhpast/tautological-expressions.lint-test
@@ -17,8 +17,8 @@
$skip_cache = f();
~~~~~~~~~~
-error:3:5
-error:5:5
-error:7:5
-error:14:15
-error:16:15
+error:3:5:XHP20
+error:5:5:XHP20
+error:7:5:XHP20
+error:14:15:XHP20
+error:16:15:XHP20
diff --git a/src/lint/linter/__tests__/xhpast/todo.lint-test b/src/lint/linter/__tests__/xhpast/todo.lint-test
--- a/src/lint/linter/__tests__/xhpast/todo.lint-test
+++ b/src/lint/linter/__tests__/xhpast/todo.lint-test
@@ -6,5 +6,5 @@
* @todo Something else goes here.
*/
~~~~~~~~~~
-disabled:3:4
-disabled:6:4
+disabled:3:4:XHP16
+disabled:6:4:XHP16
diff --git a/src/lint/linter/__tests__/xhpast/tostring-exception.lint-test b/src/lint/linter/__tests__/xhpast/tostring-exception.lint-test
--- a/src/lint/linter/__tests__/xhpast/tostring-exception.lint-test
+++ b/src/lint/linter/__tests__/xhpast/tostring-exception.lint-test
@@ -23,4 +23,4 @@
abstract public function __toString();
}
~~~~~~~~~~
-error:5:7
+error:5:7:XHP67
diff --git a/src/lint/linter/__tests__/xhpast/undeclared-variables.lint-test b/src/lint/linter/__tests__/xhpast/undeclared-variables.lint-test
--- a/src/lint/linter/__tests__/xhpast/undeclared-variables.lint-test
+++ b/src/lint/linter/__tests__/xhpast/undeclared-variables.lint-test
@@ -173,21 +173,21 @@
}
~~~~~~~~~~
-error:28:3
-error:30:3
-error:36:3
-error:42:5
-error:43:7
-error:44:5
-error:45:5
-error:46:10
-error:51:10 worst ever
-warning:61:3
-error:87:3 This stuff is basically testing the lexer/parser for function decls.
-error:104:15 Variables in instance derefs should be checked, static should not.
-error:118:3 isset() and empty() should not trigger errors.
-error:122:3 Should only warn once in this function.
-error:144:8
-error:150:9
-error:164:9
-error:171:5
+error:28:3:XHP5
+error:30:3::XHP5
+error:36:3::XHP5
+error:42:5::XHP5
+error:43:7::XHP5
+error:44:5::XHP5
+error:45:5::XHP5
+error:46:10::XHP5
+error:51:10::XHP5
+warning:61:3::XHP5
+error:87:3::XHP5
+error:104:15::XHP5
+error:118:3::XHP5
+error:122:3::XHP5
+error:144:8::XHP5
+error:150:9::XHP5
+error:164:9::XHP5
+error:171:5::XHP5
diff --git a/src/lint/linter/__tests__/xhpast/unnecessary-final-modifier.lint-test b/src/lint/linter/__tests__/xhpast/unnecessary-final-modifier.lint-test
--- a/src/lint/linter/__tests__/xhpast/unnecessary-final-modifier.lint-test
+++ b/src/lint/linter/__tests__/xhpast/unnecessary-final-modifier.lint-test
@@ -4,5 +4,5 @@
final public function baz() {}
}
~~~~~~~~~~
-error:2:13 XHP19
-advice:4:3
+error:2:13:XHP19
+advice:4:3:XHP55
diff --git a/src/lint/linter/__tests__/xhpast/use-of-this-in-static-method.lint-test b/src/lint/linter/__tests__/xhpast/use-of-this-in-static-method.lint-test
--- a/src/lint/linter/__tests__/xhpast/use-of-this-in-static-method.lint-test
+++ b/src/lint/linter/__tests__/xhpast/use-of-this-in-static-method.lint-test
@@ -10,5 +10,5 @@
}
~~~~~~~~~~
-error:3:13 XHP19 Class-Filename Mismatch
-error:8:5 Use of $this in a static method.
+error:3:13:XHP19
+error:8:5:XHP13
diff --git a/src/lint/linter/__tests__/xhpast/useless-overriding-method.lint-test b/src/lint/linter/__tests__/xhpast/useless-overriding-method.lint-test
--- a/src/lint/linter/__tests__/xhpast/useless-overriding-method.lint-test
+++ b/src/lint/linter/__tests__/xhpast/useless-overriding-method.lint-test
@@ -18,7 +18,7 @@
}
}
~~~~~~~~~~
-error:3:13
-advice:4:3
-advice:8:3
-advice:16:3
+error:3:13:XHP19
+advice:4:3:XHP63
+advice:8:3:XHP63
+advice:16:3:XHP63
diff --git a/src/lint/linter/__tests__/xhpast/variable-variables.lint-test b/src/lint/linter/__tests__/xhpast/variable-variables.lint-test
--- a/src/lint/linter/__tests__/xhpast/variable-variables.lint-test
+++ b/src/lint/linter/__tests__/xhpast/variable-variables.lint-test
@@ -2,4 +2,4 @@
$$foo;
$obj->$bar; // okay
~~~~~~~~~~
-error:2:1
+error:2:1:XHP3
diff --git a/src/lint/linter/__tests__/xhpast/windows.lint-test b/src/lint/linter/__tests__/xhpast/windows.lint-test
--- a/src/lint/linter/__tests__/xhpast/windows.lint-test
+++ b/src/lint/linter/__tests__/xhpast/windows.lint-test
@@ -2,7 +2,7 @@
chroot('/tmp');
~~~~~~~~~~
-error:3:1
+error:3:1:XHP45
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/__tests__/xhpast/wrong-concat-operator.lint-test b/src/lint/linter/__tests__/xhpast/wrong-concat-operator.lint-test
--- a/src/lint/linter/__tests__/xhpast/wrong-concat-operator.lint-test
+++ b/src/lint/linter/__tests__/xhpast/wrong-concat-operator.lint-test
@@ -4,6 +4,6 @@
'a' + $x;
$x + $y + $z + 'q' + 0;
~~~~~~~~~~
-error:3:1
-error:4:1
-error:5:1
+error:3:1:XHP21
+error:4:1:XHP21
+error:5:1:XHP21
diff --git a/src/lint/linter/__tests__/xml/almost-empty.lint-test b/src/lint/linter/__tests__/xml/almost-empty.lint-test
--- a/src/lint/linter/__tests__/xml/almost-empty.lint-test
+++ b/src/lint/linter/__tests__/xml/almost-empty.lint-test
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
~~~~~~~~~~
-error:2:1
+error:2:1:XML4
diff --git a/src/lint/linter/__tests__/xml/attr1.lint-test b/src/lint/linter/__tests__/xml/attr1.lint-test
--- a/src/lint/linter/__tests__/xml/attr1.lint-test
+++ b/src/lint/linter/__tests__/xml/attr1.lint-test
@@ -1,4 +1,4 @@
<foo foo="oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
~~~~~~~~~~
-error:1:2
-error:2:1
+error:1:2:XML5
+error:2:1:XML40
diff --git a/src/lint/linter/__tests__/xml/attr2.lint-test b/src/lint/linter/__tests__/xml/attr2.lint-test
--- a/src/lint/linter/__tests__/xml/attr2.lint-test
+++ b/src/lint/linter/__tests__/xml/attr2.lint-test
@@ -1,4 +1,4 @@
<foo foo=">oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
~~~~~~~~~~
-error:1:2
-error:2:1
+error:1:2:XML5
+error:2:1:XML40
diff --git a/src/lint/linter/__tests__/xml/attr3.lint-test b/src/lint/linter/__tests__/xml/attr3.lint-test
--- a/src/lint/linter/__tests__/xml/attr3.lint-test
+++ b/src/lint/linter/__tests__/xml/attr3.lint-test
@@ -5,4 +5,4 @@
]>
<doc></doc>
~~~~~~~~~~
-warning:4:28
+warning:4:28:XML501
diff --git a/src/lint/linter/__tests__/xml/attr4.lint-test b/src/lint/linter/__tests__/xml/attr4.lint-test
--- a/src/lint/linter/__tests__/xml/attr4.lint-test
+++ b/src/lint/linter/__tests__/xml/attr4.lint-test
@@ -1,3 +1,6 @@
<ROOT attr="XY"/>
~~~~~~~~~~
-error:1:15
+error:1:15:XML5
+error:1:15:XML73
+error:1:15:XML65
+error:1:15:XML9
diff --git a/src/lint/linter/__tests__/xml/char-ref.lint-test b/src/lint/linter/__tests__/xml/char-ref.lint-test
--- a/src/lint/linter/__tests__/xml/char-ref.lint-test
+++ b/src/lint/linter/__tests__/xml/char-ref.lint-test
@@ -1,3 +1,3 @@
<bla>&#010100000000000000000000000000000000000000000000000060;</bla>
~~~~~~~~~~
-error:1:63
+error:1:63:XML9
diff --git a/src/lint/linter/__tests__/xml/languages-5.lint-test b/src/lint/linter/__tests__/xml/languages-5.lint-test
--- a/src/lint/linter/__tests__/xml/languages-5.lint-test
+++ b/src/lint/linter/__tests__/xml/languages-5.lint-test
@@ -3,4 +3,4 @@
<>
</languages>
~~~~~~~~~~
-error:3:6
+error:3:6:XML68
diff --git a/src/lint/linter/__tests__/xml/languages-6.lint-test b/src/lint/linter/__tests__/xml/languages-6.lint-test
--- a/src/lint/linter/__tests__/xml/languages-6.lint-test
+++ b/src/lint/linter/__tests__/xml/languages-6.lint-test
@@ -3,5 +3,5 @@
</lang>
</languages>
~~~~~~~~~~
-error:3:16
-error:4:1
+error:3:16:XML76
+error:4:1:XML5
diff --git a/src/lint/linter/__tests__/xml/languages-7.lint-test b/src/lint/linter/__tests__/xml/languages-7.lint-test
--- a/src/lint/linter/__tests__/xml/languages-7.lint-test
+++ b/src/lint/linter/__tests__/xml/languages-7.lint-test
@@ -3,5 +3,5 @@
<lang>
</languages>
~~~~~~~~~~
-error:4:7
-error:5:1
+error:4:7:XML73
+error:5:1:XML77

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 30, 6:56 AM (2 w, 5 d ago)
Storage Engine
amazon-s3
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
phabricator/secure/q7/7p/3pwnqseuft77jiy4
Default Alt Text
D11176.id31697.diff (61 KB)

Event Timeline