Page MenuHomePhabricator

D11176.id48960.diff
No OneTemporary

D11176.id48960.diff

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
@@ -75,8 +75,8 @@
$config,
array(
'config' => 'optional map<string, wild>',
- 'path' => 'optional string',
'mode' => 'optional string',
+ 'path' => 'optional string',
'stopped' => 'optional bool',
));
@@ -171,81 +171,131 @@
$this->compareTransform($xform, $after_lint);
}
- private function compareLint($file, $expect, ArcanistLintResult $result) {
- $seen = array();
- $raised = array();
- $message_map = array();
+ private function compareLint($file, $expect, ArcanistLintResult $results) {
+ $expected_results = new ArcanistLintResult();
- 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);
- }
$expect = trim($expect);
if ($expect) {
$expect = explode("\n", $expect);
} else {
$expect = array();
}
- foreach ($expect as $key => $expected) {
- $expect[$key] = head(explode(' ', $expected));
- }
- $expect = array_fill_keys($expect, true);
- $seen = array_fill_keys($seen, true);
+ foreach ($expect as $result) {
+ $parts = explode(':', $result);
+
+ $message = new ArcanistLintMessage();
+
+ $severity = idx($parts, 0);
+ $line = idx($parts, 1);
+ $char = idx($parts, 2);
+ $code = idx($parts, 3);
+
+ if ($severity !== null) {
+ $message->setSeverity($severity);
+ }
+
+ if ($line !== null) {
+ $message->setLine($line);
+ }
- if (!$raised) {
- $raised = array(pht('No messages.'));
+ if ($char !== null) {
+ $message->setChar($char);
+ }
+
+ if ($code !== null) {
+ $message->setCode($code);
+ }
+
+ $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;
-
- $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));
+
+ $missing = array();
+ $surprising = $results->getMessages();
+
+ // 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 = pht('EXPECTED MESSAGES');
+ 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 .= "\n ".pht('No messages');
+ }
+
+ $actual = pht('UNEXPECTED MESSAGES');
+ 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 .= "\n ".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));
}
}
@@ -259,4 +309,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:0:0:CHMOD1:Invalid Executable
~~~~~~~~~~
~~~~~~~~~~
{"mode": "0755"}
diff --git a/src/lint/linter/__tests__/coffeelint/no_trailing_whitespace.lint-test b/src/lint/linter/__tests__/coffeelint/no_trailing_whitespace.lint-test
--- a/src/lint/linter/__tests__/coffeelint/no_trailing_whitespace.lint-test
+++ b/src/lint/linter/__tests__/coffeelint/no_trailing_whitespace.lint-test
@@ -1,4 +1,4 @@
x = 1234
y = 1
~~~~~~~~~~
-error:1:
+error:1:0
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:0:0:NAME1:Bad Filename
~~~~~~~~~~
~~~~~~~~~~
{"path": "bad@filename"}
diff --git a/src/lint/linter/__tests__/flake8/undefined.lint-test b/src/lint/linter/__tests__/flake8/undefined.lint-test
--- a/src/lint/linter/__tests__/flake8/undefined.lint-test
+++ b/src/lint/linter/__tests__/flake8/undefined.lint-test
@@ -3,5 +3,5 @@
def hello():
return foo
~~~~~~~~~~
-error:3:1
-error:4:12
+error:3:1:E302
+error:4:12:F821
diff --git a/src/lint/linter/__tests__/jshint/dot-notation.lint-test b/src/lint/linter/__tests__/jshint/dot-notation.lint-test
--- a/src/lint/linter/__tests__/jshint/dot-notation.lint-test
+++ b/src/lint/linter/__tests__/jshint/dot-notation.lint-test
@@ -2,5 +2,5 @@
args['foo'] = 'bar';
args['bar'] = 'baz';
~~~~~~~~~~
-warning:2:5
-warning:3:5
+warning:2:5:W069
+warning:3:5:W069
diff --git a/src/lint/linter/__tests__/jshint/expected-conditional.lint-test b/src/lint/linter/__tests__/jshint/expected-conditional.lint-test
--- a/src/lint/linter/__tests__/jshint/expected-conditional.lint-test
+++ b/src/lint/linter/__tests__/jshint/expected-conditional.lint-test
@@ -3,4 +3,4 @@
return true;
}
~~~~~~~~~~
-warning:2:16
+warning:2:16:W084
diff --git a/src/lint/linter/__tests__/jshint/jshint.lint-test b/src/lint/linter/__tests__/jshint/jshint.lint-test
--- a/src/lint/linter/__tests__/jshint/jshint.lint-test
+++ b/src/lint/linter/__tests__/jshint/jshint.lint-test
@@ -7,6 +7,6 @@
{
~~~~~~~~~~
-warning:3:8
-error:7:1
-error:9:1
+warning:3:8:W033
+error:7:1:E019
+error:9:1:E041
diff --git a/src/lint/linter/__tests__/jshint/missing-semicolon.lint-test b/src/lint/linter/__tests__/jshint/missing-semicolon.lint-test
--- a/src/lint/linter/__tests__/jshint/missing-semicolon.lint-test
+++ b/src/lint/linter/__tests__/jshint/missing-semicolon.lint-test
@@ -1,3 +1,3 @@
console.log('foobar')
~~~~~~~~~~
-warning:1:22
+warning:1:22:W033
diff --git a/src/lint/linter/__tests__/jshint/too-many-errors.lint-test b/src/lint/linter/__tests__/jshint/too-many-errors.lint-test
--- a/src/lint/linter/__tests__/jshint/too-many-errors.lint-test
+++ b/src/lint/linter/__tests__/jshint/too-many-errors.lint-test
@@ -1,5 +1,5 @@
/* jshint maxerr: 1 */
console.log('foobar')
~~~~~~~~~~
-disabled:2:22
-warning:2:22
+disabled:2:22:E043
+warning:2:22:W033
diff --git a/src/lint/linter/__tests__/jshint/unnecessary-semicolon.lint-test b/src/lint/linter/__tests__/jshint/unnecessary-semicolon.lint-test
--- a/src/lint/linter/__tests__/jshint/unnecessary-semicolon.lint-test
+++ b/src/lint/linter/__tests__/jshint/unnecessary-semicolon.lint-test
@@ -2,4 +2,4 @@
return 'Hello, World!';
};
~~~~~~~~~~
-warning:3:2
+warning:3:2:W032
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:Unresolved merge conflict
diff --git a/src/lint/linter/__tests__/pep8/imports.lint-test b/src/lint/linter/__tests__/pep8/imports.lint-test
--- a/src/lint/linter/__tests__/pep8/imports.lint-test
+++ b/src/lint/linter/__tests__/pep8/imports.lint-test
@@ -1,3 +1,3 @@
import os, sys
~~~~~~~~~~
-error:1:10
+error:1:10:E401
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:0:PHP2:Fatal Error
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:0:PHP1:Parse Error
diff --git a/src/lint/linter/__tests__/pyflakes/pyflakes.lint-test b/src/lint/linter/__tests__/pyflakes/pyflakes.lint-test
--- a/src/lint/linter/__tests__/pyflakes/pyflakes.lint-test
+++ b/src/lint/linter/__tests__/pyflakes/pyflakes.lint-test
@@ -2,6 +2,6 @@
x += 1
~~~~~~~~~~
-warning:1:
-warning:1:
-error:3:
+warning:1:0
+warning:1:0
+error:3:0
diff --git a/src/lint/linter/__tests__/pylint/negativechar.lint-test b/src/lint/linter/__tests__/pylint/negativechar.lint-test
--- a/src/lint/linter/__tests__/pylint/negativechar.lint-test
+++ b/src/lint/linter/__tests__/pylint/negativechar.lint-test
@@ -3,4 +3,4 @@
"""
Useless string """
~~~~~~~~~~
-warning:4:0 See T9257.
+warning:4:0:W0105:Pointless String Statement
diff --git a/src/lint/linter/__tests__/pylint/pylint.lint-test b/src/lint/linter/__tests__/pylint/pylint.lint-test
--- a/src/lint/linter/__tests__/pylint/pylint.lint-test
+++ b/src/lint/linter/__tests__/pylint/pylint.lint-test
@@ -2,6 +2,8 @@
x += 1
~~~~~~~~~~
-warning:1:0
-advice:1:0
-error:3:0
+advice:1:0:C0111:Missing Docstring
+advice:1:0:C0410:Multiple Imports
+warning:1:0:W0611:Unused Import
+warning:1:0:W0611:Unused Import
+error:3:0:E0602:Undefined Variable
diff --git a/src/lint/linter/__tests__/rubocop/convention.lint-test b/src/lint/linter/__tests__/rubocop/convention.lint-test
--- a/src/lint/linter/__tests__/rubocop/convention.lint-test
+++ b/src/lint/linter/__tests__/rubocop/convention.lint-test
@@ -1,4 +1,4 @@
def hello()
end
~~~~~~~~~~
-warning:1:10
+warning:1:10:-
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:0:RUBY:Syntax Error
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:Possible Spelling Mistake
+warning:4:10:SPELL2:Possible Spelling Mistake
+warning:5:15:SPELL2:Possible Spelling Mistake
+warning:7:7:SPELL2:Possible Spelling Mistake
+warning:7:12:SPELL2:Possible Spelling Mistake
+warning:9:15:SPELL1:Possible Spelling Mistake
+warning:10:11:SPELL2:Possible Spelling Mistake
+warning:11:12:SPELL1:Possible Spelling Mistake
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:Bad Charset
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:Leading Whitespace at BOF
~~~~~~~~~~
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:DOS Newlines
~~~~~~~~~~
The quick brown fox
jumps over the lazy dog.
diff --git a/src/lint/linter/__tests__/text/empty.lint-test b/src/lint/linter/__tests__/text/empty.lint-test
--- a/src/lint/linter/__tests__/text/empty.lint-test
+++ b/src/lint/linter/__tests__/text/empty.lint-test
@@ -1,4 +1,4 @@
~~~~~~~~~~
-error::
+error:0:0:TXT10:Empty File
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:Trailing Whitespace at EOF
~~~~~~~~~~
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:Line Too Long
~~~~~~~~~~
~~~~~~~~~~
{"config": {"text.max-line-length": 40}}
diff --git a/src/lint/linter/__tests__/text/trailing-whitespace-1.lint-test b/src/lint/linter/__tests__/text/trailing-whitespace-1.lint-test
--- a/src/lint/linter/__tests__/text/trailing-whitespace-1.lint-test
+++ b/src/lint/linter/__tests__/text/trailing-whitespace-1.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:Trailing Whitespace
+autofix:2:25:TXT6:Trailing Whitespace
~~~~~~~~~~
The quick brown fox
jumps over the lazy dog.
diff --git a/src/lint/linter/__tests__/text/trailing-whitespace-2.lint-test b/src/lint/linter/__tests__/text/trailing-whitespace-2.lint-test
--- a/src/lint/linter/__tests__/text/trailing-whitespace-2.lint-test
+++ b/src/lint/linter/__tests__/text/trailing-whitespace-2.lint-test
@@ -3,11 +3,11 @@
Phasellus sodales nibh erat,
in hendrerit nulla dictum interdum.
~~~~~~~~~~
-error:1:28
-autofix:1:28
-autofix:2:29
-autofix:3:29
-autofix:4:36
+error:1:28:TXT2:Tab Literal
+autofix:1:28:TXT6:Trailing Whitespace
+autofix:2:29:TXT6:Trailing Whitespace
+autofix:3:29:TXT6:Trailing Whitespace
+autofix:4:36:TXT6:Trailing Whitespace
~~~~~~~~~~
Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
diff --git a/src/lint/linter/__tests__/text/trailing-whitespace-3.lint-test b/src/lint/linter/__tests__/text/trailing-whitespace-3.lint-test
--- a/src/lint/linter/__tests__/text/trailing-whitespace-3.lint-test
+++ b/src/lint/linter/__tests__/text/trailing-whitespace-3.lint-test
@@ -3,11 +3,11 @@
Phasellus sodales nibh erat,
in hendrerit nulla dictum interdum.
~~~~~~~~~~
-error:1:28
-autofix:1:28
-autofix:2:29
-autofix:3:29
-autofix:4:36
+error:1:28:TXT2:Tab Literal
+autofix:1:28:TXT6:Trailing Whitespace
+autofix:2:29:TXT6:Trailing Whitespace
+autofix:3:29:TXT6:Trailing Whitespace
+autofix:4:36:TXT6:Trailing Whitespace
~~~~~~~~~~
Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
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.
~~~~~~~~~~
-disabled:2:1
+disabled:2:1:XHP78:Inline HTML
diff --git a/src/lint/linter/__tests__/xhpast/empty.lint-test b/src/lint/linter/__tests__/xhpast/empty.lint-test
--- a/src/lint/linter/__tests__/xhpast/empty.lint-test
+++ b/src/lint/linter/__tests__/xhpast/empty.lint-test
@@ -1,4 +1,4 @@
<?php
~~~~~~~~~~
-warning::
+warning:0:0:XHP82:Empty File
diff --git a/src/lint/linter/__tests__/xhpast/no-segfault-on-abstract.lint-test b/src/lint/linter/__tests__/xhpast/no-segfault-on-abstract.lint-test
--- a/src/lint/linter/__tests__/xhpast/no-segfault-on-abstract.lint-test
+++ b/src/lint/linter/__tests__/xhpast/no-segfault-on-abstract.lint-test
@@ -3,5 +3,5 @@
abstract class A {}
final class F {}
~~~~~~~~~~
-disabled:3:1
-disabled:4:1
+disabled:3:1:XHP88:Class Not Extending `Phobject`
+disabled:4:1:XHP88:Class Not Extending `Phobject`
diff --git a/src/lint/linter/__tests__/xhpast/single-pass-adjacent-patches.lint-test b/src/lint/linter/__tests__/xhpast/single-pass-adjacent-patches.lint-test
--- a/src/lint/linter/__tests__/xhpast/single-pass-adjacent-patches.lint-test
+++ b/src/lint/linter/__tests__/xhpast/single-pass-adjacent-patches.lint-test
@@ -6,8 +6,12 @@
g( );
}
~~~~~~~~~~
-warning:5:12
-warning:6:5
+warning:5:12:XHP38:Declaration Formatting
+warning:5:12:XHP25:Spaces Inside Parentheses
+warning:5:12:XHP25:Spaces Inside Parentheses
+warning:6:5:XHP37:Call Formatting
+warning:6:5:XHP25:Spaces Inside Parentheses
+warning:6:5:XHP25:Spaces Inside Parentheses
~~~~~~~~~~
<?php
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:PHP Syntax Error!
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:LibXML Error
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:LibXML Error
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:LibXML Error
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:LibXML Error
+error:4:1:XML5:LibXML Error
diff --git a/src/lint/linter/xhpast/rules/__tests__/__lambda_func-function/lamba-func-function.lint-test b/src/lint/linter/xhpast/rules/__tests__/__lambda_func-function/lamba-func-function.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/__lambda_func-function/lamba-func-function.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/__lambda_func-function/lamba-func-function.lint-test
@@ -2,4 +2,4 @@
function __lambda_func() {}
~~~~~~~~~~
-error:3:1
+error:3:1:XHP68:`__lambda_func` Function
diff --git a/src/lint/linter/xhpast/rules/__tests__/__toString-exception/__toString-exception.lint-test b/src/lint/linter/xhpast/rules/__tests__/__toString-exception/__toString-exception.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/__toString-exception/__toString-exception.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/__toString-exception/__toString-exception.lint-test
@@ -24,4 +24,4 @@
abstract public function __toString();
}
~~~~~~~~~~
-error:6:7
+error:6:7:XHP67:Throwing Exception in `__toString` Method
diff --git a/src/lint/linter/xhpast/rules/__tests__/abstract-method-body/body.lint-test b/src/lint/linter/xhpast/rules/__tests__/abstract-method-body/body.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/abstract-method-body/body.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/abstract-method-body/body.lint-test
@@ -3,4 +3,4 @@
abstract public function someMethod() {}
}
~~~~~~~~~~
-error:3:41
+error:3:41:XHP108:`abstract` Method Cannot Contain Body
diff --git a/src/lint/linter/xhpast/rules/__tests__/abstract-private-method/abstract-private-method.lint-test b/src/lint/linter/xhpast/rules/__tests__/abstract-private-method/abstract-private-method.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/abstract-private-method/abstract-private-method.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/abstract-private-method/abstract-private-method.lint-test
@@ -3,4 +3,4 @@
private abstract function someMethod();
}
~~~~~~~~~~
-error:3:3
+error:3:3:XHP107:`abstract` Method Cannot Be Declared `private`
diff --git a/src/lint/linter/xhpast/rules/__tests__/alias-functions/alias-functions.lint-test b/src/lint/linter/xhpast/rules/__tests__/alias-functions/alias-functions.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/alias-functions/alias-functions.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/alias-functions/alias-functions.lint-test
@@ -5,9 +5,9 @@
die();
sizeOf($x);
~~~~~~~~~~
-advice:4:1
-advice:5:1
-advice:6:1
+advice:4:1:XHP65:Alias Functions
+advice:5:1:XHP65:Alias Functions
+advice:6:1:XHP65:Alias Functions
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/array-combine/array-combine.lint-test b/src/lint/linter/xhpast/rules/__tests__/array-combine/array-combine.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/array-combine/array-combine.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/array-combine/array-combine.lint-test
@@ -3,4 +3,4 @@
array_combine($x, $x);
array_combine($x, $y);
~~~~~~~~~~
-disabled:3:1
+disabled:3:1:XHP84:`array_combine()` Unreliable
diff --git a/src/lint/linter/xhpast/rules/__tests__/array-index-spacing/array-index-spacing.lint-test b/src/lint/linter/xhpast/rules/__tests__/array-index-spacing/array-index-spacing.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/array-index-spacing/array-index-spacing.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/array-index-spacing/array-index-spacing.lint-test
@@ -5,8 +5,8 @@
$a[]=1;
$a [] = 1;
~~~~~~~~~~
-warning:3:3
-warning:6:3
+warning:3:3:XHP28:Spacing Before Array Index
+warning:6:3:XHP28:Spacing Before Array Index
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/array-separator/array-separator.lint-test b/src/lint/linter/xhpast/rules/__tests__/array-separator/array-separator.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/array-separator/array-separator.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/array-separator/array-separator.lint-test
@@ -34,12 +34,12 @@
2,
3, /* comment */ );
~~~~~~~~~~
-advice:4:14
-advice:13:3
-advice:17:3
-advice:27:3
-advice:31:3
-advice:35:20
+advice:4:14:XHP48:Array Separator
+advice:13:3:XHP48:Array Separator
+advice:17:3:XHP48:Array Separator
+advice:27:3:XHP48:Array Separator
+advice:31:3:XHP48:Array Separator
+advice:35:20:XHP48:Array Separator
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/array-value/array-value.lint-test b/src/lint/linter/xhpast/rules/__tests__/array-value/array-value.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/array-value/array-value.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/array-value/array-value.lint-test
@@ -20,12 +20,12 @@
array('quack',
);
~~~~~~~~~~
-warning:4:5
-warning:4:8
-warning:8:18
-warning:12:17
-warning:12:32
-warning:20:7
+warning:4:5:XHP76:Array Element
+warning:4:8:XHP76:Array Element
+warning:8:18:XHP76:Array Element
+warning:12:17:XHP76:Array Element
+warning:12:32:XHP76:Array Element
+warning:20:7:XHP76:Array Element
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/binary-expression-spacing/array.lint-test b/src/lint/linter/xhpast/rules/__tests__/binary-expression-spacing/array.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/binary-expression-spacing/array.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/binary-expression-spacing/array.lint-test
@@ -16,10 +16,10 @@
$x=>$y,
);
~~~~~~~~~~
-warning:4:9
-warning:5:10
-warning:6:9
-warning:16:5
+warning:4:9:XHP27:Space Around Binary Operator
+warning:5:10:XHP27:Space Around Binary Operator
+warning:6:9:XHP27:Space Around Binary Operator
+warning:16:5:XHP27:Space Around Binary Operator
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/binary-expression-spacing/binary-expression-spacing.lint-test b/src/lint/linter/xhpast/rules/__tests__/binary-expression-spacing/binary-expression-spacing.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/binary-expression-spacing/binary-expression-spacing.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/binary-expression-spacing/binary-expression-spacing.lint-test
@@ -24,19 +24,19 @@
if ($x instanceof z && $w) {}
f(1,2);
~~~~~~~~~~
-warning:4:3
-warning:5:4
-warning:6:3
-warning:8:3
-warning:9:3
-warning:10:4
-warning:11:3
-warning:12:3
-warning:14:14
-warning:21:52
-warning:22:54
-warning:23:21
-warning:25:4
+warning:4:3:XHP27:Space Around Binary Operator
+warning:5:4:XHP27:Space Around Binary Operator
+warning:6:3:XHP27:Space Around Binary Operator
+warning:8:3:XHP27:Space Around Binary Operator
+warning:9:3:XHP27:Space Around Binary Operator
+warning:10:4:XHP27:Space Around Binary Operator
+warning:11:3:XHP27:Space Around Binary Operator
+warning:12:3:XHP27:Space Around Binary Operator
+warning:14:14:XHP27:Space Around Binary Operator
+warning:21:52:XHP27:Space Around Binary Operator
+warning:22:54:XHP27:Space Around Binary Operator
+warning:23:21:XHP27:Space Around Binary Operator
+warning:25:4:XHP27:Space Around Binary Operator
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/binary-numeric-scalar-casing/binary.lint-test b/src/lint/linter/xhpast/rules/__tests__/binary-numeric-scalar-casing/binary.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/binary-numeric-scalar-casing/binary.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/binary-numeric-scalar-casing/binary.lint-test
@@ -2,4 +2,4 @@
0b1;
0B1;
~~~~~~~~~~
-warning:3:1
+warning:3:1:XHP131:Binary Integer Casing
diff --git a/src/lint/linter/xhpast/rules/__tests__/blacklisted-function/blacklisted-function.lint-test b/src/lint/linter/xhpast/rules/__tests__/blacklisted-function/blacklisted-function.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/blacklisted-function/blacklisted-function.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/blacklisted-function/blacklisted-function.lint-test
@@ -2,7 +2,7 @@
eval('evil code');
~~~~~~~~~~
-error:3:1
+error:3:1:XHP51:Use of Blacklisted Function
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/xhpast/rules/__tests__/brace-formatting/class.lint-test b/src/lint/linter/xhpast/rules/__tests__/brace-formatting/class.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/brace-formatting/class.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/brace-formatting/class.lint-test
@@ -4,8 +4,8 @@
class SomeOtherClass{}
class YetAnotherClass extends SomeClass{}
~~~~~~~~~~
-warning:4:21
-warning:5:40
+warning:4:21:XHP24:Brace Placement
+warning:5:40:XHP24:Brace Placement
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/brace-formatting/control-statement.lint-test b/src/lint/linter/xhpast/rules/__tests__/brace-formatting/control-statement.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/brace-formatting/control-statement.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/brace-formatting/control-statement.lint-test
@@ -22,17 +22,17 @@
if ($x) {}else{}
~~~~~~~~~~
-warning:3:7
-warning:6:20
-warning:9:10
-warning:12:11
-warning:15:9
-warning:16:6
-warning:17:4
-warning:19:11
-warning:20:16
-warning:23:11
-warning:23:15
+warning:3:7:XHP24:Brace Placement
+warning:6:20:XHP24:Brace Placement
+warning:9:10:XHP24:Brace Placement
+warning:12:11:XHP24:Brace Placement
+warning:15:9:XHP24:Brace Placement
+warning:16:6:XHP24:Brace Placement
+warning:17:4:XHP24:Brace Placement
+warning:19:11:XHP24:Brace Placement
+warning:20:16:XHP24:Brace Placement
+warning:23:11:XHP24:Brace Placement
+warning:23:15:XHP24:Brace Placement
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/brace-formatting/function.lint-test b/src/lint/linter/xhpast/rules/__tests__/brace-formatting/function.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/brace-formatting/function.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/brace-formatting/function.lint-test
@@ -11,8 +11,8 @@
function h(){}
~~~~~~~~~~
-warning:7:13
-warning:12:13
+warning:7:13:XHP24:Brace Placement
+warning:12:13:XHP24:Brace Placement
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/brace-formatting/try-catch.lint-test b/src/lint/linter/xhpast/rules/__tests__/brace-formatting/try-catch.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/brace-formatting/try-catch.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/brace-formatting/try-catch.lint-test
@@ -5,8 +5,8 @@
catch (Exception $x)
{}
~~~~~~~~~~
-warning:3:4
-warning:5:21
+warning:3:4:XHP24:Brace Placement
+warning:5:21:XHP24:Brace Placement
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/call-parentheses/array.lint-test b/src/lint/linter/xhpast/rules/__tests__/call-parentheses/array.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/call-parentheses/array.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/call-parentheses/array.lint-test
@@ -4,9 +4,9 @@
list ( $x, $y ) = array();
[ 1, 2 , 3 ];
~~~~~~~~~~
-warning:3:6
-warning:4:5
-warning:4:14
+warning:3:6:XHP37:Call Formatting
+warning:4:5:XHP37:Call Formatting
+warning:4:14:XHP37:Call Formatting
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/call-parentheses/call-parentheses.lint-test b/src/lint/linter/xhpast/rules/__tests__/call-parentheses/call-parentheses.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/call-parentheses/call-parentheses.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/call-parentheses/call-parentheses.lint-test
@@ -18,9 +18,9 @@
);
f (1);
~~~~~~~~~~
-warning:4:4
-warning:9:4
-warning:19:2
+warning:4:4:XHP37:Call Formatting
+warning:9:4:XHP37:Call Formatting
+warning:19:2:XHP37:Call Formatting
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/call-time-pass-by-reference/call-time-pass-by-reference.lint-test b/src/lint/linter/xhpast/rules/__tests__/call-time-pass-by-reference/call-time-pass-by-reference.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/call-time-pass-by-reference/call-time-pass-by-reference.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/call-time-pass-by-reference/call-time-pass-by-reference.lint-test
@@ -25,9 +25,9 @@
array_walk(array(), function () use (&$x) {});
MyClass::myfunc(array(&$x, &$y));
~~~~~~~~~~
-error:10:8
-error:13:15
-error:16:17
-error:19:24
-error:19:39
-error:23:6
+error:10:8:XHP53:Call-Time Pass-By-Reference
+error:13:15:XHP53:Call-Time Pass-By-Reference
+error:16:17:XHP53:Call-Time Pass-By-Reference
+error:19:24:XHP53:Call-Time Pass-By-Reference
+error:19:39:XHP53:Call-Time Pass-By-Reference
+error:23:6:XHP53:Call-Time Pass-By-Reference
diff --git a/src/lint/linter/xhpast/rules/__tests__/cast-spacing/cast-spacing.lint-test b/src/lint/linter/xhpast/rules/__tests__/cast-spacing/cast-spacing.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/cast-spacing/cast-spacing.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/cast-spacing/cast-spacing.lint-test
@@ -4,8 +4,8 @@
echo (int) 1;
echo (string) 2;
~~~~~~~~~~
-advice:4:11
-advice:5:14
+advice:4:11:XHP66:Cast Spacing
+advice:5:14:XHP66:Cast Spacing
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/class-extends-object/extends-phobject.lint-test b/src/lint/linter/xhpast/rules/__tests__/class-extends-object/extends-phobject.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/class-extends-object/extends-phobject.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/class-extends-object/extends-phobject.lint-test
@@ -4,4 +4,4 @@
final class B extends A {}
final class C {}
~~~~~~~~~~
-disabled:5:1
+disabled:5:1:XHP88:Class Not Extending `Phobject`
diff --git a/src/lint/linter/xhpast/rules/__tests__/class-must-be-declared-abstract/should-be-abstract.lint-test b/src/lint/linter/xhpast/rules/__tests__/class-must-be-declared-abstract/should-be-abstract.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/class-must-be-declared-abstract/should-be-abstract.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/class-must-be-declared-abstract/should-be-abstract.lint-test
@@ -3,4 +3,4 @@
abstract public function someMethod();
}
~~~~~~~~~~
-error:2:1
+error:2:1:XHP113:`class` Containing `abstract` Methods Must Be Declared `abstract`
diff --git a/src/lint/linter/xhpast/rules/__tests__/class-name-literal/class-name-literal.lint-test b/src/lint/linter/xhpast/rules/__tests__/class-name-literal/class-name-literal.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/class-name-literal/class-name-literal.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/class-name-literal/class-name-literal.lint-test
@@ -18,8 +18,8 @@
}
};
~~~~~~~~~~
-advice:5:12
-advice:9:10
+advice:5:12:XHP62:Class Name Literal
+advice:9:10:XHP62:Class Name Literal
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/comment-style/hash-comments.lint-test b/src/lint/linter/xhpast/rules/__tests__/comment-style/hash-comments.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/comment-style/hash-comments.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/comment-style/hash-comments.lint-test
@@ -21,11 +21,11 @@
/** yes */
/**** yes ****/
~~~~~~~~~~
-error:3:1
-error:4:1
-error:6:1
-error:7:11
-error:16:1
+error:3:1:XHP18:Comment Style
+error:4:1:XHP18:Comment Style
+error:6:1:XHP18:Comment Style
+error:7:11:XHP18:Comment Style
+error:16:1:XHP18:Comment Style
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/concatenation-operator/concatenation-operator.lint-test b/src/lint/linter/xhpast/rules/__tests__/concatenation-operator/concatenation-operator.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/concatenation-operator/concatenation-operator.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/concatenation-operator/concatenation-operator.lint-test
@@ -9,10 +9,10 @@
$a. // This should be okay.
$b;
~~~~~~~~~~
-warning:4:3
-warning:4:5
-warning:5:4
-warning:6:3
+warning:4:3:XHP44:Concatenation Spacing
+warning:4:5:XHP44:Concatenation Spacing
+warning:5:4:XHP44:Concatenation Spacing
+warning:6:3:XHP44:Concatenation Spacing
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/constructor-parentheses/constructor-parentheses.lint-test b/src/lint/linter/xhpast/rules/__tests__/constructor-parentheses/constructor-parentheses.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/constructor-parentheses/constructor-parentheses.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/constructor-parentheses/constructor-parentheses.lint-test
@@ -5,8 +5,8 @@
new Foo\Bar;
new class {};
~~~~~~~~~~
-advice:3:5
-advice:5:5
+advice:3:5:XHP49:Constructor Parentheses
+advice:5:5:XHP49:Constructor Parentheses
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/continue-inside-switch/continue-inside-switch-1-valid.lint-test b/src/lint/linter/xhpast/rules/__tests__/continue-inside-switch/continue-inside-switch-1-valid.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/continue-inside-switch/continue-inside-switch-1-valid.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/continue-inside-switch/continue-inside-switch-1-valid.lint-test
@@ -18,4 +18,3 @@
continue;
} while ($x);
~~~~~~~~~~
-~~~~~~~~~~
diff --git a/src/lint/linter/xhpast/rules/__tests__/continue-inside-switch/continue-inside-switch-2-n.lint-test b/src/lint/linter/xhpast/rules/__tests__/continue-inside-switch/continue-inside-switch-2-n.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/continue-inside-switch/continue-inside-switch-2-n.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/continue-inside-switch/continue-inside-switch-2-n.lint-test
@@ -21,4 +21,3 @@
break;
}
~~~~~~~~~~
-~~~~~~~~~~
diff --git a/src/lint/linter/xhpast/rules/__tests__/continue-inside-switch/continue-inside-switch-3-rewrite.lint-test b/src/lint/linter/xhpast/rules/__tests__/continue-inside-switch/continue-inside-switch-3-rewrite.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/continue-inside-switch/continue-inside-switch-3-rewrite.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/continue-inside-switch/continue-inside-switch-3-rewrite.lint-test
@@ -10,8 +10,8 @@
continue /* CRITICAL: Nuclear launch code is 1234. */ ;
}
~~~~~~~~~~
-error:5:5
-error:10:5
+error:5:5:XHP128:Continue Inside Switch
+error:10:5:XHP128:Continue Inside Switch
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/control-statement-spacing/control-statement-spacing.lint-test b/src/lint/linter/xhpast/rules/__tests__/control-statement-spacing/control-statement-spacing.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/control-statement-spacing/control-statement-spacing.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/control-statement-spacing/control-statement-spacing.lint-test
@@ -26,18 +26,18 @@
try {} catch(Exception $ex) {}
~~~~~~~~~~
-warning:3:1
-warning:4:1
-warning:5:1
-warning:6:1
-warning:7:1
-warning:8:1
-warning:8:6
-warning:9:1
-warning:14:3
-warning:15:3
-warning:25:3
-warning:27:8
+warning:3:1:XHP26:Space After Control Statement
+warning:4:1:XHP26:Space After Control Statement
+warning:5:1:XHP26:Space After Control Statement
+warning:6:1:XHP26:Space After Control Statement
+warning:7:1:XHP26:Space After Control Statement
+warning:8:1:XHP26:Space After Control Statement
+warning:8:6:XHP26:Space After Control Statement
+warning:9:1:XHP26:Space After Control Statement
+warning:14:3:XHP26:Space After Control Statement
+warning:15:3:XHP26:Space After Control Statement
+warning:25:3:XHP26:Space After Control Statement
+warning:27:8:XHP26:Space After Control Statement
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/curly-brace-array-index/array.lint-test b/src/lint/linter/xhpast/rules/__tests__/curly-brace-array-index/array.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/curly-brace-array-index/array.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/curly-brace-array-index/array.lint-test
@@ -2,7 +2,7 @@
$x['key'];
$y{'key'};
~~~~~~~~~~
-warning:3:1
+warning:3:1:XHP119:Curly Brace Array Index
~~~~~~~~~~
<?php
$x['key'];
diff --git a/src/lint/linter/xhpast/rules/__tests__/curly-brace-array-index/nested.lint-test b/src/lint/linter/xhpast/rules/__tests__/curly-brace-array-index/nested.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/curly-brace-array-index/nested.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/curly-brace-array-index/nested.lint-test
@@ -1,7 +1,7 @@
<?php
$x[$y{'key'}];
~~~~~~~~~~
-warning:2:4
+warning:2:4:XHP119:Curly Brace Array Index
~~~~~~~~~~
<?php
$x[$y['key']];
diff --git a/src/lint/linter/xhpast/rules/__tests__/curly-brace-array-index/whitespace.lint-test b/src/lint/linter/xhpast/rules/__tests__/curly-brace-array-index/whitespace.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/curly-brace-array-index/whitespace.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/curly-brace-array-index/whitespace.lint-test
@@ -1,7 +1,7 @@
<?php
$x { 'key' /* comment */ };
~~~~~~~~~~
-warning:2:1
+warning:2:1:XHP119:Curly Brace Array Index
~~~~~~~~~~
<?php
$x [ 'key' /* comment */ ];
diff --git a/src/lint/linter/xhpast/rules/__tests__/declaration-parentheses/declaration-parentheses.lint-test b/src/lint/linter/xhpast/rules/__tests__/declaration-parentheses/declaration-parentheses.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/declaration-parentheses/declaration-parentheses.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/declaration-parentheses/declaration-parentheses.lint-test
@@ -25,16 +25,16 @@
f(function ($x ) use ($z) {});
f(function ($x)use($z) {});
~~~~~~~~~~
-warning:4:14
-warning:5:11
-warning:8:15
-warning:13:23
-warning:16:31
-warning:19:33
-warning:24:15
-warning:25:15
-warning:26:16
-warning:26:19
+warning:4:14:XHP38:Declaration Formatting
+warning:5:11:XHP38:Declaration Formatting
+warning:8:15:XHP38:Declaration Formatting
+warning:13:23:XHP38:Declaration Formatting
+warning:16:31:XHP38:Declaration Formatting
+warning:19:33:XHP38:Declaration Formatting
+warning:24:15:XHP38:Declaration Formatting
+warning:25:15:XHP38:Declaration Formatting
+warning:26:16:XHP38:Declaration Formatting
+warning:26:19:XHP38:Declaration Formatting
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/default-parameters/default-parameters.lint-test b/src/lint/linter/xhpast/rules/__tests__/default-parameters/default-parameters.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/default-parameters/default-parameters.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/default-parameters/default-parameters.lint-test
@@ -8,5 +8,5 @@
public function myMethod($x, $y = null, $z) {}
}
~~~~~~~~~~
-warning:4:13
-warning:8:27
+warning:4:13:XHP60:Default Parameters
+warning:8:27:XHP60:Default Parameters
diff --git a/src/lint/linter/xhpast/rules/__tests__/deprecation/deprecated-function.lint-test b/src/lint/linter/xhpast/rules/__tests__/deprecation/deprecated-function.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/deprecation/deprecated-function.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/deprecation/deprecated-function.lint-test
@@ -3,7 +3,7 @@
deprecated_function();
modern_function();
~~~~~~~~~~
-warning:3:1
+warning:3:1:XHP85:Use of Deprecated Function
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/xhpast/rules/__tests__/double-quote/double-quote.lint-test b/src/lint/linter/xhpast/rules/__tests__/double-quote/double-quote.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/double-quote/double-quote.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/double-quote/double-quote.lint-test
@@ -13,7 +13,7 @@
"This string also requires \123\345 double quotes, but ".
"this string does not. Here, they are used for consistency.");
~~~~~~~~~~
-advice:4:1
+advice:4:1:XHP41:Unnecessary Double Quotes
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/duplicate-keys-in-array/duplicate-keys-in-array.lint-test b/src/lint/linter/xhpast/rules/__tests__/duplicate-keys-in-array/duplicate-keys-in-array.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/duplicate-keys-in-array/duplicate-keys-in-array.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/duplicate-keys-in-array/duplicate-keys-in-array.lint-test
@@ -35,9 +35,9 @@
$a => 'var2',
);
~~~~~~~~~~
-error:6:3
-error:9:3
-error:16:3
-error:21:3
-error:26:3
-error:35:3
+error:6:3:XHP22:Duplicate Keys in Array
+error:9:3:XHP22:Duplicate Keys in Array
+error:16:3:XHP22:Duplicate Keys in Array
+error:21:3:XHP22:Duplicate Keys in Array
+error:26:3:XHP22:Duplicate Keys in Array
+error:35:3:XHP22:Duplicate Keys in Array
diff --git a/src/lint/linter/xhpast/rules/__tests__/duplicate-switch-case/duplicate-switch-case.lint-test b/src/lint/linter/xhpast/rules/__tests__/duplicate-switch-case/duplicate-switch-case.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/duplicate-switch-case/duplicate-switch-case.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/duplicate-switch-case/duplicate-switch-case.lint-test
@@ -25,5 +25,5 @@
break;
}
~~~~~~~~~~
-error:16:3
-error:23:7
+error:16:3:XHP50:Duplicate Case Statements
+error:23:7:XHP50:Duplicate Case Statements
diff --git a/src/lint/linter/xhpast/rules/__tests__/dynamic-define/dynamic-define.lint-test b/src/lint/linter/xhpast/rules/__tests__/dynamic-define/dynamic-define.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/dynamic-define/dynamic-define.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/dynamic-define/dynamic-define.lint-test
@@ -5,5 +5,5 @@
define('PONY', $cute);
define($pony, $cute);
~~~~~~~~~~
-error:4:8 dynamic define
-error:6:8 dynamic define
+error:4:8:XHP12:Dynamic `define`
+error:6:8:XHP12:Dynamic `define`
diff --git a/src/lint/linter/xhpast/rules/__tests__/elseif-usage/elseif-usage.lint-test b/src/lint/linter/xhpast/rules/__tests__/elseif-usage/elseif-usage.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/elseif-usage/elseif-usage.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/elseif-usage/elseif-usage.lint-test
@@ -8,7 +8,7 @@
echo 'baz';
}
~~~~~~~~~~
-advice:5:3
+advice:5:3:XHP42:`elseif` Usage
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/empty-statement/empty-statement.lint-test b/src/lint/linter/xhpast/rules/__tests__/empty-statement/empty-statement.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/empty-statement/empty-statement.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/empty-statement/empty-statement.lint-test
@@ -10,8 +10,8 @@
}
~~~~~~~~~~
-advice:7:14
-advice:8:14
+advice:7:14:XHP47:Empty Block Statement
+advice:8:14:XHP47:Empty Block Statement
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/exit-expression/exit-expression.lint-test b/src/lint/linter/xhpast/rules/__tests__/exit-expression/exit-expression.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/exit-expression/exit-expression.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/exit-expression/exit-expression.lint-test
@@ -4,5 +4,5 @@
exit -1;
strtoupper(33 * exit - 6);
~~~~~~~~~~
-error:4:1
-error:5:17
+error:4:1:XHP17:`exit` Used as Expression
+error:5:17:XHP17:`exit` Used as Expression
diff --git a/src/lint/linter/xhpast/rules/__tests__/extract-use/extract-use.lint-test b/src/lint/linter/xhpast/rules/__tests__/extract-use/extract-use.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/extract-use/extract-use.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/extract-use/extract-use.lint-test
@@ -2,4 +2,4 @@
extract();
~~~~~~~~~~
-error:3:1
+error:3:1:XHP4:Use of `extract`
diff --git a/src/lint/linter/xhpast/rules/__tests__/formatted-string/formatted-string.lint-test b/src/lint/linter/xhpast/rules/__tests__/formatted-string/formatted-string.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/formatted-string/formatted-string.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/formatted-string/formatted-string.lint-test
@@ -12,11 +12,11 @@
foobar(null, null, '%s');
~~~~~~~~~~
-error:3:1
-error:7:1
-error:8:1
-error:11:1
-error:13:1
+error:3:1:XHP54:Formatted String
+error:7:1:XHP54:Formatted String
+error:8:1:XHP54:Formatted String
+error:11:1:XHP54:Formatted String
+error:13:1:XHP54:Formatted String
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/base.lint-test b/src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/base.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/base.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/base.lint-test
@@ -3,8 +3,8 @@
intval($x, 8);
intval($x, 10);
~~~~~~~~~~
-advice:2:1
-advice:4:1
+advice:2:1:XHP105:Function Call Should Be Type Cast
+advice:4:1:XHP105:Function Call Should Be Type Cast
~~~~~~~~~~
<?php
(int)$x;
diff --git a/src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/binary-expression.lint-test b/src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/binary-expression.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/binary-expression.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/binary-expression.lint-test
@@ -1,7 +1,7 @@
<?php
intval($x / 2) + 1;
~~~~~~~~~~
-advice:2:1
+advice:2:1:XHP105:Function Call Should Be Type Cast
~~~~~~~~~~
<?php
(int)($x / 2) + 1;
diff --git a/src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/cast-functions.lint-test b/src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/cast-functions.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/cast-functions.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/cast-functions.lint-test
@@ -5,11 +5,11 @@
intval($x);
strval($x);
~~~~~~~~~~
-advice:2:1
-advice:3:1
-advice:4:1
-advice:5:1
-advice:6:1
+advice:2:1:XHP105:Function Call Should Be Type Cast
+advice:3:1:XHP105:Function Call Should Be Type Cast
+advice:4:1:XHP105:Function Call Should Be Type Cast
+advice:5:1:XHP105:Function Call Should Be Type Cast
+advice:6:1:XHP105:Function Call Should Be Type Cast
~~~~~~~~~~
<?php
(bool)$x;
diff --git a/src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/parameter-mismatch.lint-test b/src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/parameter-mismatch.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/parameter-mismatch.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/parameter-mismatch.lint-test
@@ -3,7 +3,7 @@
// we don't provide an autofix.
strval($x, $y);
~~~~~~~~~~
-advice:4:1
+advice:4:1:XHP105:Function Call Should Be Type Cast
~~~~~~~~~~
<?php
// If the function call doesn't have exactly one parameter,
diff --git a/src/lint/linter/xhpast/rules/__tests__/global-variable/global-variable.lint-test b/src/lint/linter/xhpast/rules/__tests__/global-variable/global-variable.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/global-variable/global-variable.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/global-variable/global-variable.lint-test
@@ -5,5 +5,5 @@
global $x, $y;
}
~~~~~~~~~~
-warning:3:1
-warning:5:3
+warning:3:1:XHP79:Global Variables
+warning:5:3:XHP79:Global Variables
diff --git a/src/lint/linter/xhpast/rules/__tests__/hexadecimal-numeric-scalar-casing/hexadecimal.lint-test b/src/lint/linter/xhpast/rules/__tests__/hexadecimal-numeric-scalar-casing/hexadecimal.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/hexadecimal-numeric-scalar-casing/hexadecimal.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/hexadecimal-numeric-scalar-casing/hexadecimal.lint-test
@@ -3,8 +3,8 @@
0xff;
0XFF;
~~~~~~~~~~
-warning:3:1
-warning:4:1
+warning:3:1:XHP127:Hexadecimal Integer Casing
+warning:4:1:XHP127:Hexadecimal Integer Casing
~~~~~~~~~~
<?php
0xFF;
diff --git a/src/lint/linter/xhpast/rules/__tests__/implicit-constructor/implicit-constructor.lint-test b/src/lint/linter/xhpast/rules/__tests__/implicit-constructor/implicit-constructor.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/implicit-constructor/implicit-constructor.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/implicit-constructor/implicit-constructor.lint-test
@@ -6,4 +6,4 @@
}
}
~~~~~~~~~~
-error:4:19
+error:4:19:XHP10:Implicit Constructor
diff --git a/src/lint/linter/xhpast/rules/__tests__/implicit-fallthrough/implicit-fallthrough.lint-test b/src/lint/linter/xhpast/rules/__tests__/implicit-fallthrough/implicit-fallthrough.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/implicit-fallthrough/implicit-fallthrough.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/implicit-fallthrough/implicit-fallthrough.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:Implicit Fallthrough
+warning:48:3:XHP30:Implicit Fallthrough
+warning:53:3:XHP30:Implicit Fallthrough
+warning:57:3:XHP30:Implicit Fallthrough
+warning:66:3:XHP30:Implicit Fallthrough
+warning:71:3:XHP30:Implicit Fallthrough
+warning:75:3:XHP30:Implicit Fallthrough
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/xhpast/rules/__tests__/implicit-visibility/implicit-visibility.lint-test b/src/lint/linter/xhpast/rules/__tests__/implicit-visibility/implicit-visibility.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/implicit-visibility/implicit-visibility.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/implicit-visibility/implicit-visibility.lint-test
@@ -11,10 +11,10 @@
private $z;
}
~~~~~~~~~~
-advice:5:3
-advice:6:3
-advice:9:3
-advice:10:3
+advice:5:3:XHP52:Implicit Method Visibility
+advice:6:3:XHP52:Implicit Method Visibility
+advice:9:3:XHP52:Implicit Method Visibility
+advice:10:3:XHP52:Implicit Method Visibility
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/inline-html/inline-html.lint-test b/src/lint/linter/xhpast/rules/__tests__/inline-html/inline-html.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/inline-html/inline-html.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/inline-html/inline-html.lint-test
@@ -1,4 +1,4 @@
#!/usr/bin/env php
<html>
~~~~~~~~~~
-disabled:2:1
+disabled:2:1:XHP78:Inline HTML
diff --git a/src/lint/linter/xhpast/rules/__tests__/inner-function/inner-function.lint-test b/src/lint/linter/xhpast/rules/__tests__/inner-function/inner-function.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/inner-function/inner-function.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/inner-function/inner-function.lint-test
@@ -11,4 +11,4 @@
function () {};
}
~~~~~~~~~~
-warning:5:5
+warning:5:5:XHP59:Inner Functions
diff --git a/src/lint/linter/xhpast/rules/__tests__/instanceof-operator/instanceof-operator.lint-test b/src/lint/linter/xhpast/rules/__tests__/instanceof-operator/instanceof-operator.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/instanceof-operator/instanceof-operator.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/instanceof-operator/instanceof-operator.lint-test
@@ -5,6 +5,6 @@
var_dump(null instanceof stdClass);
var_dump($x instanceof stdClass);
~~~~~~~~~~
-error:3:10
-error:4:10
-error:5:10
+error:3:10:XHP69:`instanceof` Operator
+error:4:10:XHP69:`instanceof` Operator
+error:5:10:XHP69:`instanceof` Operator
diff --git a/src/lint/linter/xhpast/rules/__tests__/interface-abstract-method/abstract.lint-test b/src/lint/linter/xhpast/rules/__tests__/interface-abstract-method/abstract.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/interface-abstract-method/abstract.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/interface-abstract-method/abstract.lint-test
@@ -4,4 +4,4 @@
abstract public function someMethod();
}
~~~~~~~~~~
-error:4:3
+error:4:3:XHP118:`interface` Methods Cannot Be Marked `abstract`
diff --git a/src/lint/linter/xhpast/rules/__tests__/interface-method-body/body.lint-test b/src/lint/linter/xhpast/rules/__tests__/interface-method-body/body.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/interface-method-body/body.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/interface-method-body/body.lint-test
@@ -4,4 +4,4 @@
public function someMethod() {}
}
~~~~~~~~~~
-error:4:32
+error:4:32:XHP114:`interface` Method Cannot Contain Body
diff --git a/src/lint/linter/xhpast/rules/__tests__/invalid-default-parameter/invalid-default-parameter.lint-test b/src/lint/linter/xhpast/rules/__tests__/invalid-default-parameter/invalid-default-parameter.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/invalid-default-parameter/invalid-default-parameter.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/invalid-default-parameter/invalid-default-parameter.lint-test
@@ -13,6 +13,6 @@
function func_nine(stdClass $x = null) {}
function func_ten(stdClass $x = array()) {}
~~~~~~~~~~
-error:6:31
-error:10:35
-error:14:33
+error:6:31:XHP70:Invalid Default Parameter
+error:10:35:XHP70:Invalid Default Parameter
+error:14:33:XHP70:Invalid Default Parameter
diff --git a/src/lint/linter/xhpast/rules/__tests__/invalid-modifiers/invalid-modifiers.lint-test b/src/lint/linter/xhpast/rules/__tests__/invalid-modifiers/invalid-modifiers.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/invalid-modifiers/invalid-modifiers.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/invalid-modifiers/invalid-modifiers.lint-test
@@ -11,8 +11,8 @@
abstract final public function baz() {}
}
~~~~~~~~~~
-error:5:10
-error:6:10
-error:7:11
-error:10:10
-error:11:12
+error:5:10:XHP72:Invalid Modifiers
+error:6:10:XHP72:Invalid Modifiers
+error:7:11:XHP72:Invalid Modifiers
+error:10:10:XHP72:Invalid Modifiers
+error:11:12:XHP72:Invalid Modifiers
diff --git a/src/lint/linter/xhpast/rules/__tests__/invalid-octal-numeric-scalar/octal.lint-test b/src/lint/linter/xhpast/rules/__tests__/invalid-octal-numeric-scalar/octal.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/invalid-octal-numeric-scalar/octal.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/invalid-octal-numeric-scalar/octal.lint-test
@@ -3,5 +3,5 @@
08;
-08;
~~~~~~~~
-error:3:1
-error:4:2
+error:3:1:XHP125:Invalid Octal Numeric Scalar
+error:4:2:XHP125:Invalid Octal Numeric Scalar
diff --git a/src/lint/linter/xhpast/rules/__tests__/is_a-should-be-instanceof/is_a.lint-test b/src/lint/linter/xhpast/rules/__tests__/is_a-should-be-instanceof/is_a.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/is_a-should-be-instanceof/is_a.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/is_a-should-be-instanceof/is_a.lint-test
@@ -4,10 +4,10 @@
is_a($x, '\\SomeClass');
is_a($x, '\\'.'Some'.'Class');
~~~~~~~~~~
-advice:2:1
-advice:3:1
-advice:4:1
-advice:5:1
+advice:2:1:XHP111:`is_a` Should Be `instanceof`
+advice:3:1:XHP111:`is_a` Should Be `instanceof`
+advice:4:1:XHP111:`is_a` Should Be `instanceof`
+advice:5:1:XHP111:`is_a` Should Be `instanceof`
~~~~~~~~~~
<?php
$x instanceof $y;
diff --git a/src/lint/linter/xhpast/rules/__tests__/keyword-casing/keyword-casing.lint-test b/src/lint/linter/xhpast/rules/__tests__/keyword-casing/keyword-casing.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/keyword-casing/keyword-casing.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/keyword-casing/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:Keyword Conventions
+warning:7:1:XHP40:Keyword Conventions
+warning:8:1:XHP40:Keyword Conventions
+warning:9:1:XHP40:Keyword Conventions
+warning:11:1:XHP40:Keyword Conventions
+warning:13:22:XHP40:Keyword Conventions
+warning:16:1:XHP40:Keyword Conventions
+warning:18:6:XHP40:Keyword Conventions
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/keyword-casing/parent.lint-test b/src/lint/linter/xhpast/rules/__tests__/keyword-casing/parent.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/keyword-casing/parent.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/keyword-casing/parent.lint-test
@@ -10,7 +10,7 @@
}
}
~~~~~~~~~~
-warning:5:12
+warning:5:12:XHP40:Keyword Conventions
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/keyword-casing/self.lint-test b/src/lint/linter/xhpast/rules/__tests__/keyword-casing/self.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/keyword-casing/self.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/keyword-casing/self.lint-test
@@ -10,7 +10,7 @@
}
}
~~~~~~~~~~
-warning:5:12
+warning:5:12:XHP40:Keyword Conventions
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/language-construct-parentheses/language-construct-parentheses.lint-test b/src/lint/linter/xhpast/rules/__tests__/language-construct-parentheses/language-construct-parentheses.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/language-construct-parentheses/language-construct-parentheses.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/language-construct-parentheses/language-construct-parentheses.lint-test
@@ -18,16 +18,16 @@
require_once ('baz.php');
echo ('baz');
~~~~~~~~~~
-warning:9:8
-warning:10:13
-warning:11:8
-warning:12:13
-warning:13:5
-warning:15:9
-warning:16:14
-warning:17:9
-warning:18:14
-warning:19:6
+warning:9:8:XHP46:Language Construct Parentheses
+warning:10:13:XHP46:Language Construct Parentheses
+warning:11:8:XHP46:Language Construct Parentheses
+warning:12:13:XHP46:Language Construct Parentheses
+warning:13:5:XHP46:Language Construct Parentheses
+warning:15:9:XHP46:Language Construct Parentheses
+warning:16:14:XHP46:Language Construct Parentheses
+warning:17:9:XHP46:Language Construct Parentheses
+warning:18:14:XHP46:Language Construct Parentheses
+warning:19:6:XHP46:Language Construct Parentheses
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/list-assignment/list-assignment.lint-test b/src/lint/linter/xhpast/rules/__tests__/list-assignment/list-assignment.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/list-assignment/list-assignment.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/list-assignment/list-assignment.lint-test
@@ -3,9 +3,9 @@
list($x, $y, , ,) = array();
list($x, $y, , , $z) = array();
~~~~~~~~~~
-warning:3:12
-warning:3:14
-warning:3:16
+warning:3:12:XHP77:List Assignment
+warning:3:14:XHP77:List Assignment
+warning:3:16:XHP77:List Assignment
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/logical-operators/logical-operators.lint-test b/src/lint/linter/xhpast/rules/__tests__/logical-operators/logical-operators.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/logical-operators/logical-operators.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/logical-operators/logical-operators.lint-test
@@ -8,8 +8,8 @@
$x or $y;
$x || $y;
~~~~~~~~~~
-advice:6:4
-advice:8:4
+advice:6:4:XHP58:Logical Operators
+advice:8:4:XHP58:Logical Operators
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/lowercase-functions/lowercase-functions.lint-test b/src/lint/linter/xhpast/rules/__tests__/lowercase-functions/lowercase-functions.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/lowercase-functions/lowercase-functions.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/lowercase-functions/lowercase-functions.lint-test
@@ -3,7 +3,7 @@
var_dump('');
Var_Dump('');
~~~~~~~~~~
-advice:4:1
+advice:4:1:XHP61:Lowercase Functions
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/modifier-ordering/modifier-ordering.lint-test b/src/lint/linter/xhpast/rules/__tests__/modifier-ordering/modifier-ordering.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/modifier-ordering/modifier-ordering.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/modifier-ordering/modifier-ordering.lint-test
@@ -9,9 +9,9 @@
static final public function foobar() {}
}
~~~~~~~~~~
-advice:5:3
-advice:7:3
-advice:9:3
+advice:5:3:XHP71:Modifier Ordering
+advice:7:3:XHP71:Modifier Ordering
+advice:9:3:XHP71:Modifier Ordering
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/namespace-first-statement/class-before-namespace.lint-test b/src/lint/linter/xhpast/rules/__tests__/namespace-first-statement/class-before-namespace.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/namespace-first-statement/class-before-namespace.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/namespace-first-statement/class-before-namespace.lint-test
@@ -2,4 +2,4 @@
class X {}
namespace X;
~~~~~~~~~~
-error:2:1
+error:2:1:XHP98:`namespace` Statement Must Be The First Statement
diff --git a/src/lint/linter/xhpast/rules/__tests__/namespace-first-statement/incorrect.lint-test b/src/lint/linter/xhpast/rules/__tests__/namespace-first-statement/incorrect.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/namespace-first-statement/incorrect.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/namespace-first-statement/incorrect.lint-test
@@ -13,4 +13,4 @@
echo 2;
}
~~~~~~~~~~
-error:9:1
+error:9:1:XHP98:`namespace` Statement Must Be The First Statement
diff --git a/src/lint/linter/xhpast/rules/__tests__/naming-conventions/constant-case.lint-test b/src/lint/linter/xhpast/rules/__tests__/naming-conventions/constant-case.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/naming-conventions/constant-case.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/naming-conventions/constant-case.lint-test
@@ -7,6 +7,6 @@
const bar = 'baz';
}
~~~~~~~~~~
-warning:3:8
-warning:4:7
-warning:7:9
+warning:3:8:XHP9:Naming Conventions
+warning:4:7:XHP9:Naming Conventions
+warning:7:9:XHP9:Naming Conventions
diff --git a/src/lint/linter/xhpast/rules/__tests__/naming-conventions/naming-conventions.lint-test b/src/lint/linter/xhpast/rules/__tests__/naming-conventions/naming-conventions.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/naming-conventions/naming-conventions.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/naming-conventions/naming-conventions.lint-test
@@ -50,22 +50,22 @@
$mIxEdCaSe = 1;
}
~~~~~~~~~~
-warning:3:13
-warning:4:9
-warning:4:9
-warning:4:16
-warning:4:16
-warning:5:13
-warning:5:17
-warning:6:19
-warning:6:21
-warning:6:25
-warning:9:11
-warning:11:10
-warning:11:13
-warning:21:13
-warning:24:3
-warning:25:3
-warning:26:3
-warning:28:3
-warning:50:3
+warning:3:13:XHP9:Naming Conventions
+warning:4:9:XHP9:Naming Conventions
+warning:4:9:XHP9:Naming Conventions
+warning:4:16:XHP9:Naming Conventions
+warning:4:16:XHP9:Naming Conventions
+warning:5:13:XHP9:Naming Conventions
+warning:5:17:XHP9:Naming Conventions
+warning:6:19:XHP9:Naming Conventions
+warning:6:21:XHP9:Naming Conventions
+warning:6:25:XHP9:Naming Conventions
+warning:9:11:XHP9:Naming Conventions
+warning:11:10:XHP9:Naming Conventions
+warning:11:13:XHP9:Naming Conventions
+warning:21:13:XHP9:Naming Conventions
+warning:24:3:XHP9:Naming Conventions
+warning:25:3:XHP9:Naming Conventions
+warning:26:3:XHP9:Naming Conventions
+warning:28:3:XHP9:Naming Conventions
+warning:50:3:XHP9:Naming Conventions
diff --git a/src/lint/linter/xhpast/rules/__tests__/nested-namespaces/nested.lint-test b/src/lint/linter/xhpast/rules/__tests__/nested-namespaces/nested.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/nested-namespaces/nested.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/nested-namespaces/nested.lint-test
@@ -5,5 +5,5 @@
}
}
~~~~~~~~~~
-error:3:3
-error:4:5
+error:3:3:XHP90:Nested `namespace` Statements
+error:4:5:XHP90:Nested `namespace` Statements
diff --git a/src/lint/linter/xhpast/rules/__tests__/newline-after-open-tag/newline-after-open-tag.lint-test b/src/lint/linter/xhpast/rules/__tests__/newline-after-open-tag/newline-after-open-tag.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/newline-after-open-tag/newline-after-open-tag.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/newline-after-open-tag/newline-after-open-tag.lint-test
@@ -8,8 +8,8 @@
<?
phpinfo();
~~~~~~~~~~
-advice:4:6
-advice:8:3
+advice:4:6:XHP81:Newline After PHP Open Tag
+advice:8:3:XHP81:Newline After PHP Open Tag
~~~~~~~~~~
<?php phpinfo() ?>
<? phpinfo(); ?>
diff --git a/src/lint/linter/xhpast/rules/__tests__/no-parent-scope/no-parent-scope.lint-test b/src/lint/linter/xhpast/rules/__tests__/no-parent-scope/no-parent-scope.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/no-parent-scope/no-parent-scope.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/no-parent-scope/no-parent-scope.lint-test
@@ -16,4 +16,4 @@
}
}
~~~~~~~~~~
-error:11:5
+error:11:5:XHP64:No Parent Scope
diff --git a/src/lint/linter/xhpast/rules/__tests__/object-operator-spacing/object-operator-spacing.lint-test b/src/lint/linter/xhpast/rules/__tests__/object-operator-spacing/object-operator-spacing.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/object-operator-spacing/object-operator-spacing.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/object-operator-spacing/object-operator-spacing.lint-test
@@ -4,8 +4,8 @@
id(new Something())
->doSomething();
~~~~~~~~~~
-warning:3:3
-warning:3:6
+warning:3:3:XHP74:Object Operator Spacing
+warning:3:6:XHP74:Object Operator Spacing
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/paamayim-nekudotayim-spacing/paamayim-nekudotayim-spacing.lint-test b/src/lint/linter/xhpast/rules/__tests__/paamayim-nekudotayim-spacing/paamayim-nekudotayim-spacing.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/paamayim-nekudotayim-spacing/paamayim-nekudotayim-spacing.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/paamayim-nekudotayim-spacing/paamayim-nekudotayim-spacing.lint-test
@@ -13,12 +13,12 @@
MyClass::$myProperty;
MyClass :: $myProperty;
~~~~~~~~~~
-warning:6:14
-warning:6:17
-warning:11:8
-warning:11:11
-warning:14:8
-warning:14:11
+warning:6:14:XHP96:Paamayim Nekudotayim Spacing
+warning:6:17:XHP96:Paamayim Nekudotayim Spacing
+warning:11:8:XHP96:Paamayim Nekudotayim Spacing
+warning:11:11:XHP96:Paamayim Nekudotayim Spacing
+warning:14:8:XHP96:Paamayim Nekudotayim Spacing
+warning:14:11:XHP96:Paamayim Nekudotayim Spacing
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/parent-member-references/parent.lint-test b/src/lint/linter/xhpast/rules/__tests__/parent-member-references/parent.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/parent-member-references/parent.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/parent-member-references/parent.lint-test
@@ -5,7 +5,7 @@
}
}
~~~~~~~~~~
-warning:4:5
+warning:4:5:XHP83:Parent Member Reference
~~~~~~~~~~
<?php
class Foo extends Bar {
diff --git a/src/lint/linter/xhpast/rules/__tests__/parentheses-spacing/array.lint-test b/src/lint/linter/xhpast/rules/__tests__/parentheses-spacing/array.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/parentheses-spacing/array.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/parentheses-spacing/array.lint-test
@@ -4,12 +4,12 @@
list ( $x, $y ) = array();
[ 1, 2 , 3 ];
~~~~~~~~~~
-warning:3:8
-warning:3:16
-warning:4:7
-warning:4:14
-warning:5:2
-warning:5:11
+warning:3:8:XHP25:Spaces Inside Parentheses
+warning:3:16:XHP25:Spaces Inside Parentheses
+warning:4:7:XHP25:Spaces Inside Parentheses
+warning:4:14:XHP25:Spaces Inside Parentheses
+warning:5:2:XHP25:Spaces Inside Parentheses
+warning:5:11:XHP25:Spaces Inside Parentheses
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/parentheses-spacing/parentheses-spacing.lint-test b/src/lint/linter/xhpast/rules/__tests__/parentheses-spacing/parentheses-spacing.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/parentheses-spacing/parentheses-spacing.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/parentheses-spacing/parentheses-spacing.lint-test
@@ -21,22 +21,22 @@
$a // if comments are present
);
~~~~~~~~~~
-warning:3:5
-warning:3:8
-warning:4:3
-warning:5:3
-warning:7:21
-warning:7:24
-warning:13:6
-warning:13:30
-warning:14:10
-warning:14:19
-warning:15:12
-warning:15:15
-warning:17:21
-warning:17:24
-warning:19:10
-warning:19:25
+warning:3:5:XHP25:Spaces Inside Parentheses
+warning:3:8:XHP25:Spaces Inside Parentheses
+warning:4:3:XHP25:Spaces Inside Parentheses
+warning:5:3:XHP25:Spaces Inside Parentheses
+warning:7:21:XHP25:Spaces Inside Parentheses
+warning:7:24:XHP25:Spaces Inside Parentheses
+warning:13:6:XHP25:Spaces Inside Parentheses
+warning:13:30:XHP25:Spaces Inside Parentheses
+warning:14:10:XHP25:Spaces Inside Parentheses
+warning:14:19:XHP25:Spaces Inside Parentheses
+warning:15:12:XHP25:Spaces Inside Parentheses
+warning:15:15:XHP25:Spaces Inside Parentheses
+warning:17:21:XHP25:Spaces Inside Parentheses
+warning:17:24:XHP25:Spaces Inside Parentheses
+warning:19:10:XHP25:Spaces Inside Parentheses
+warning:19:25:XHP25:Spaces Inside Parentheses
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/parse_str-use/parse_str-use.lint-test b/src/lint/linter/xhpast/rules/__tests__/parse_str-use/parse_str-use.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/parse_str-use/parse_str-use.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/parse_str-use/parse_str-use.lint-test
@@ -4,4 +4,4 @@
parse_str('foo=bar', $params);
parse_str('foo=bar');
~~~~~~~~~~
-error:5:1
+error:5:1:XHP80:Questionable Use of `parse_str`
diff --git a/src/lint/linter/xhpast/rules/__tests__/php-close-tag/php-close-tag.lint-test b/src/lint/linter/xhpast/rules/__tests__/php-close-tag/php-close-tag.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/php-close-tag/php-close-tag.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/php-close-tag/php-close-tag.lint-test
@@ -2,4 +2,4 @@
return;
?>
~~~~~~~~~~
-error:3:1
+error:3:1:XHP8:Use of Close Tag `?>`
diff --git a/src/lint/linter/xhpast/rules/__tests__/php-compatibility/conditional-usage.lint-test b/src/lint/linter/xhpast/rules/__tests__/php-compatibility/conditional-usage.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/php-compatibility/conditional-usage.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/php-compatibility/conditional-usage.lint-test
@@ -20,9 +20,9 @@
$var = 'some_func';
if ($var()) {}
~~~~~~~~~~
-error:5:3
-error:7:3
-error:12:7
+error:5:3:XHP45:PHP Compatibility
+error:7:3:XHP45:PHP Compatibility
+error:12:7:XHP45:PHP Compatibility
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/xhpast/rules/__tests__/php-compatibility/index-function.lint-test b/src/lint/linter/xhpast/rules/__tests__/php-compatibility/index-function.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/php-compatibility/index-function.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/php-compatibility/index-function.lint-test
@@ -2,7 +2,7 @@
f()[0];
~~~~~~~~~~
-error:3:5
+error:3:5:XHP45:PHP Compatibility
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/xhpast/rules/__tests__/php-compatibility/nowdoc.lint-test b/src/lint/linter/xhpast/rules/__tests__/php-compatibility/nowdoc.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/php-compatibility/nowdoc.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/php-compatibility/nowdoc.lint-test
@@ -4,7 +4,7 @@
Hello World!
EOT;
~~~~~~~~~~
-error:3:6
+error:3:6:XHP45:PHP Compatibility
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/xhpast/rules/__tests__/php-compatibility/php-compatibility.lint-test b/src/lint/linter/xhpast/rules/__tests__/php-compatibility/php-compatibility.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/php-compatibility/php-compatibility.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/php-compatibility/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:PHP Compatibility
+error:4:10:XHP45:PHP Compatibility
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/xhpast/rules/__tests__/php-compatibility/php53-features.lint-test b/src/lint/linter/xhpast/rules/__tests__/php-compatibility/php53-features.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/php-compatibility/php53-features.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/php-compatibility/php53-features.lint-test
@@ -11,13 +11,13 @@
$a::m();
echo __DIR__;
~~~~~~~~~~
-error:3:1
-error:4:1
-error:5:3
-error:6:3
-error:7:1
-error:9:1
-error:12:6
+error:3:1:XHP45:PHP Compatibility
+error:4:1:XHP45:PHP Compatibility
+error:5:3:XHP45:PHP Compatibility
+error:6:3:XHP45:PHP Compatibility
+error:7:1:XHP45:PHP Compatibility
+error:9:1:XHP45:PHP Compatibility
+error:12:6:XHP45:PHP Compatibility
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/xhpast/rules/__tests__/php-compatibility/php54-features.lint-test b/src/lint/linter/xhpast/rules/__tests__/php-compatibility/php54-features.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/php-compatibility/php54-features.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/php-compatibility/php54-features.lint-test
@@ -25,12 +25,12 @@
[];
~~~~~~~~~~
-error:3:5
-error:4:9
-error:12:7
-error:18:7
-error:23:1
-error:25:1
+error:3:5:XHP45:PHP Compatibility
+error:4:9:XHP45:PHP Compatibility
+error:12:7:XHP45:PHP Compatibility
+error:18:7:XHP45:PHP Compatibility
+error:23:1:XHP45:PHP Compatibility
+error:25:1:XHP45:PHP Compatibility
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/xhpast/rules/__tests__/php-compatibility/php54-incompat.lint-test b/src/lint/linter/xhpast/rules/__tests__/php-compatibility/php54-incompat.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/php-compatibility/php54-incompat.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/php-compatibility/php54-incompat.lint-test
@@ -9,10 +9,10 @@
continue 1;
continue 1 + foo() * $bar;
~~~~~~~~~~
-error:4:7
-error:6:7
-error:8:10
-error:10:10
+error:4:7:XHP45:PHP Compatibility
+error:6:7:XHP45:PHP Compatibility
+error:8:10:XHP45:PHP Compatibility
+error:10:10:XHP45:PHP Compatibility
~~~~~~~~~~
~~~~~~~~~~
{"config": {"xhpast.php-version": "5.4.0"}}
diff --git a/src/lint/linter/xhpast/rules/__tests__/php-compatibility/windows.lint-test b/src/lint/linter/xhpast/rules/__tests__/php-compatibility/windows.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/php-compatibility/windows.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/php-compatibility/windows.lint-test
@@ -2,7 +2,7 @@
chroot('/tmp');
~~~~~~~~~~
-error:3:1
+error:3:1:XHP45:PHP Compatibility
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/xhpast/rules/__tests__/php-echo-tag/php-echo-tag.lint-test b/src/lint/linter/xhpast/rules/__tests__/php-echo-tag/php-echo-tag.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/php-echo-tag/php-echo-tag.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/php-echo-tag/php-echo-tag.lint-test
@@ -1,4 +1,4 @@
<?=
~~~~~~~~~~
-error:1:1
+error:1:1:XHP7:Use of Echo Tag `<?=`
diff --git a/src/lint/linter/xhpast/rules/__tests__/php-open-tag/php-open-tag.lint-test b/src/lint/linter/xhpast/rules/__tests__/php-open-tag/php-open-tag.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/php-open-tag/php-open-tag.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/php-open-tag/php-open-tag.lint-test
@@ -3,7 +3,7 @@
?>
~~~~~~~~~~
-error:1:1
+error:1:1:XHP15:Expected Open Tag
~~~~~~~~~~
garbage garbage
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/php-short-tag/php-short-tag.lint-test b/src/lint/linter/xhpast/rules/__tests__/php-short-tag/php-short-tag.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/php-short-tag/php-short-tag.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/php-short-tag/php-short-tag.lint-test
@@ -1,6 +1,6 @@
<?
~~~~~~~~~~
-error:1:1
+error:1:1:XHP6:Use of Short Tag `<?`
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/plus-operator-on-strings/plus-operator-on-strings.lint-test b/src/lint/linter/xhpast/rules/__tests__/plus-operator-on-strings/plus-operator-on-strings.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/plus-operator-on-strings/plus-operator-on-strings.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/plus-operator-on-strings/plus-operator-on-strings.lint-test
@@ -5,6 +5,6 @@
'a' + $x;
$x + $y + $z + 'q' + 0;
~~~~~~~~~~
-error:4:1
-error:5:1
-error:6:1
+error:4:1:XHP21:Not String Concatenation
+error:5:1:XHP21:Not String Concatenation
+error:6:1:XHP21:Not String Concatenation
diff --git a/src/lint/linter/xhpast/rules/__tests__/preg_quote-misuse/preg_quote-misuse.lint-test b/src/lint/linter/xhpast/rules/__tests__/preg_quote-misuse/preg_quote-misuse.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/preg_quote-misuse/preg_quote-misuse.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/preg_quote-misuse/preg_quote-misuse.lint-test
@@ -7,5 +7,5 @@
preg_quote('moo', '/');
}
~~~~~~~~~~
-advice:4:3 Wrong number of arguments to preg_quote()
-advice:6:3 Wrong number of arguments to preg_quote()
+advice:4:3:XHP14:Misuse of `preg_quote`
+advice:6:3:XHP14:Misuse of `preg_quote`
diff --git a/src/lint/linter/xhpast/rules/__tests__/public-property/class.lint-test b/src/lint/linter/xhpast/rules/__tests__/public-property/class.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/public-property/class.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/public-property/class.lint-test
@@ -6,4 +6,4 @@
public $z;
}
~~~~~~~~~~
-advice:6:3
+advice:6:3:XHP130:Use of `public` Properties
diff --git a/src/lint/linter/xhpast/rules/__tests__/ragged-classtree-edge/ragged-classtree-edge.lint-test b/src/lint/linter/xhpast/rules/__tests__/ragged-classtree-edge/ragged-classtree-edge.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/ragged-classtree-edge/ragged-classtree-edge.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/ragged-classtree-edge/ragged-classtree-edge.lint-test
@@ -9,4 +9,4 @@
*/
class D extends Phobject {}
~~~~~~~~~~
-disabled:3:7
+disabled:3:7:XHP87:Class Not `abstract` Or `final`
diff --git a/src/lint/linter/xhpast/rules/__tests__/reused-as-iterator/reused-as-iterator.lint-test b/src/lint/linter/xhpast/rules/__tests__/reused-as-iterator/reused-as-iterator.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/reused-as-iterator/reused-as-iterator.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/reused-as-iterator/reused-as-iterator.lint-test
@@ -63,5 +63,5 @@
foreach ($other as $item) {}
}
~~~~~~~~~~
-error:43:22
-error:53:22
+error:43:22:XHP32:Variable Reused As Iterator
+error:53:22:XHP32:Variable Reused As Iterator
diff --git a/src/lint/linter/xhpast/rules/__tests__/reused-iterator-reference/reused-iterator-reference.lint-test b/src/lint/linter/xhpast/rules/__tests__/reused-iterator-reference/reused-iterator-reference.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/reused-iterator-reference/reused-iterator-reference.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/reused-iterator-reference/reused-iterator-reference.lint-test
@@ -120,11 +120,11 @@
$a++; // Reuse of $a
}
~~~~~~~~~~
-warning:6:3
-warning:12:8
-warning:18:10
-warning:27:20
-warning:33:3
-warning:52:3
-warning:110:5
-warning:120:3
+warning:6:3:XHP39:Reuse of Iterator References
+warning:12:8:XHP39:Reuse of Iterator References
+warning:18:10:XHP39:Reuse of Iterator References
+warning:27:20:XHP39:Reuse of Iterator References
+warning:33:3:XHP39:Reuse of Iterator References
+warning:52:3:XHP39:Reuse of Iterator References
+warning:110:5:XHP39:Reuse of Iterator References
+warning:120:3:XHP39:Reuse of Iterator References
diff --git a/src/lint/linter/xhpast/rules/__tests__/reused-iterator/reused-iterator.lint-test b/src/lint/linter/xhpast/rules/__tests__/reused-iterator/reused-iterator.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/reused-iterator/reused-iterator.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/reused-iterator/reused-iterator.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:Reuse of Iterator Variable
+error:10:11:XHP23:Reuse of Iterator Variable
+error:16:11:XHP23:Reuse of Iterator Variable
+error:22:11:XHP23:Reuse of Iterator Variable
+error:36:7:XHP23:Reuse of Iterator Variable
+error:48:7:XHP23:Reuse of Iterator Variable
diff --git a/src/lint/linter/xhpast/rules/__tests__/self-class-reference/self-class-references.lint-test b/src/lint/linter/xhpast/rules/__tests__/self-class-reference/self-class-references.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/self-class-reference/self-class-references.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/self-class-reference/self-class-references.lint-test
@@ -16,7 +16,7 @@
}
};
~~~~~~~~~~
-warning:5:16
+warning:5:16:XHP95:Self Class Reference
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/self-member-reference/php54.lint-test b/src/lint/linter/xhpast/rules/__tests__/self-member-reference/php54.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/self-member-reference/php54.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/self-member-reference/php54.lint-test
@@ -10,7 +10,7 @@
}
}
~~~~~~~~~~
-warning:6:7
+warning:6:7:XHP57:Self Member Reference
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/self-member-reference/self-member-reference.lint-test b/src/lint/linter/xhpast/rules/__tests__/self-member-reference/self-member-reference.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/self-member-reference/self-member-reference.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/self-member-reference/self-member-reference.lint-test
@@ -9,7 +9,7 @@
}
}
~~~~~~~~~~
-warning:7:10
+warning:7:10:XHP57:Self Member Reference
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/semicolon-spacing/semicolon-spacing.lint-test b/src/lint/linter/xhpast/rules/__tests__/semicolon-spacing/semicolon-spacing.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/semicolon-spacing/semicolon-spacing.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/semicolon-spacing/semicolon-spacing.lint-test
@@ -6,8 +6,8 @@
;
~~~~~~~~~~
-advice:4:6
-advice:5:6
+advice:4:6:XHP43:Semicolon Spacing
+advice:5:6:XHP43:Semicolon Spacing
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/slowness/slowness.lint-test b/src/lint/linter/xhpast/rules/__tests__/slowness/slowness.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/slowness/slowness.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/slowness/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:Slow Construct
+warning:4:2:XHP36:Slow Construct
+warning:5:8:XHP36:Slow Construct
+warning:8:2:XHP36:Slow Construct
diff --git a/src/lint/linter/xhpast/rules/__tests__/static-this/static-this.lint-test b/src/lint/linter/xhpast/rules/__tests__/static-this/static-this.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/static-this/static-this.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/static-this/static-this.lint-test
@@ -9,4 +9,4 @@
}
}
~~~~~~~~~~
-error:8:5
+error:8:5:XHP13:Use of `$this` in Static Context
diff --git a/src/lint/linter/xhpast/rules/__tests__/tautological-expression/tautological-expression.lint-test b/src/lint/linter/xhpast/rules/__tests__/tautological-expression/tautological-expression.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/tautological-expression/tautological-expression.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/tautological-expression/tautological-expression.lint-test
@@ -16,8 +16,8 @@
$skip_cache = false && something();
$skip_cache = f();
~~~~~~~~~~
-error:3:5
-error:5:5
-error:7:5
-error:14:15
-error:16:15
+error:3:5:XHP20:Tautological Expression
+error:5:5:XHP20:Tautological Expression
+error:7:5:XHP20:Tautological Expression
+error:14:15:XHP20:Tautological Expression
+error:16:15:XHP20:Tautological Expression
diff --git a/src/lint/linter/xhpast/rules/__tests__/this-reassignment/class.lint-test b/src/lint/linter/xhpast/rules/__tests__/this-reassignment/class.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/this-reassignment/class.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/this-reassignment/class.lint-test
@@ -5,4 +5,4 @@
}
}
~~~~~~~~~~
-error:4:5
+error:4:5:XHP91:`$this` Reassignment
diff --git a/src/lint/linter/xhpast/rules/__tests__/this-reassignment/this.lint-test b/src/lint/linter/xhpast/rules/__tests__/this-reassignment/this.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/this-reassignment/this.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/this-reassignment/this.lint-test
@@ -1,4 +1,4 @@
<?php
$this = null;
~~~~~~~~~~
-error:2:1
+error:2:1:XHP91:`$this` Reassignment
diff --git a/src/lint/linter/xhpast/rules/__tests__/todo-comment/todo-comment.lint-test b/src/lint/linter/xhpast/rules/__tests__/todo-comment/todo-comment.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/todo-comment/todo-comment.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/todo-comment/todo-comment.lint-test
@@ -6,5 +6,5 @@
* @todo Something else goes here.
*/
~~~~~~~~~~
-disabled:3:4
-disabled:6:4
+disabled:3:4:XHP16:TODO Comment
+disabled:6:4:XHP16:TODO Comment
diff --git a/src/lint/linter/xhpast/rules/__tests__/unary-postfix-expression-spacing/unary-postfix-expression-spacing.lint-test b/src/lint/linter/xhpast/rules/__tests__/unary-postfix-expression-spacing/unary-postfix-expression-spacing.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/unary-postfix-expression-spacing/unary-postfix-expression-spacing.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/unary-postfix-expression-spacing/unary-postfix-expression-spacing.lint-test
@@ -3,7 +3,7 @@
$x ++;
$y--;
~~~~~~~~~~
-warning:3:3
+warning:3:3:XHP75:Space Before Unary Postfix Operator
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/unary-prefix-expression-spacing/unary-prefix-expression-spacing.lint-test b/src/lint/linter/xhpast/rules/__tests__/unary-prefix-expression-spacing/unary-prefix-expression-spacing.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/unary-prefix-expression-spacing/unary-prefix-expression-spacing.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/unary-prefix-expression-spacing/unary-prefix-expression-spacing.lint-test
@@ -4,8 +4,8 @@
@fclose($f);
exit ();
~~~~~~~~~~
-warning:3:7
-warning:5:5
+warning:3:7:XHP73:Space After Unary Prefix Operator
+warning:5:5:XHP73:Space After Unary Prefix Operator
~~~~~~~~~~
<?php
diff --git a/src/lint/linter/xhpast/rules/__tests__/undeclared-variable/undeclared-variable.lint-test b/src/lint/linter/xhpast/rules/__tests__/undeclared-variable/undeclared-variable.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/undeclared-variable/undeclared-variable.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/undeclared-variable/undeclared-variable.lint-test
@@ -186,19 +186,19 @@
};
}
~~~~~~~~~~
-error:28:3
-error:42:5
-error:43:7
-error:44:5
-error:45:5
-error:46:10
-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:178:10
-error:185:14
+error:28:3:XHP5:Use of Undeclared Variable
+error:42:5:XHP5:Use of Undeclared Variable
+error:43:7:XHP5:Use of Undeclared Variable
+error:44:5:XHP5:Use of Undeclared Variable
+error:45:5:XHP5:Use of Undeclared Variable
+error:46:10:XHP5:Use of Undeclared Variable
+error:87:3:XHP5:Use of Undeclared Variable
+error:104:15:XHP5:Use of Undeclared Variable
+error:118:3:XHP5:Use of Undeclared Variable
+error:122:3:XHP5:Use of Undeclared Variable
+error:144:8:XHP5:Use of Undeclared Variable
+error:150:9:XHP5:Use of Undeclared Variable
+error:164:9:XHP5:Use of Undeclared Variable
+error:171:5:XHP5:Use of Undeclared Variable
+error:178:10:XHP5:Use of Undeclared Variable
+error:185:14:XHP5:Use of Undeclared Variable
diff --git a/src/lint/linter/xhpast/rules/__tests__/unexpected-return-value/construct.lint-test b/src/lint/linter/xhpast/rules/__tests__/unexpected-return-value/construct.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/unexpected-return-value/construct.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/unexpected-return-value/construct.lint-test
@@ -5,4 +5,4 @@
}
}
~~~~~~~~~~
-warning:4:5
+warning:4:5:XHP92:Unexpected `return` Value
diff --git a/src/lint/linter/xhpast/rules/__tests__/unexpected-return-value/destruct.lint-test b/src/lint/linter/xhpast/rules/__tests__/unexpected-return-value/destruct.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/unexpected-return-value/destruct.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/unexpected-return-value/destruct.lint-test
@@ -5,4 +5,4 @@
}
}
~~~~~~~~~~
-warning:4:5
+warning:4:5:XHP92:Unexpected `return` Value
diff --git a/src/lint/linter/xhpast/rules/__tests__/unnecessary-final-modifier/unnecessary-final-modifier.lint-test b/src/lint/linter/xhpast/rules/__tests__/unnecessary-final-modifier/unnecessary-final-modifier.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/unnecessary-final-modifier/unnecessary-final-modifier.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/unnecessary-final-modifier/unnecessary-final-modifier.lint-test
@@ -6,4 +6,4 @@
}
$c = new class {};
~~~~~~~~~~
-advice:5:3
+advice:5:3:XHP55:Unnecessary Final Modifier
diff --git a/src/lint/linter/xhpast/rules/__tests__/unnecessary-symbol-alias/use.lint-test b/src/lint/linter/xhpast/rules/__tests__/unnecessary-symbol-alias/use.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/unnecessary-symbol-alias/use.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/unnecessary-symbol-alias/use.lint-test
@@ -5,8 +5,8 @@
use E\F as F;
use G\H as I;
~~~~~~~~~~
-warning:3:5
-warning:5:5
+warning:3:5:XHP99:Unnecessary Symbol Alias
+warning:5:5:XHP99:Unnecessary Symbol Alias
~~~~~~~~~~
<?php
use A;
diff --git a/src/lint/linter/xhpast/rules/__tests__/unsafe-dynamic-string/pht.lint-test b/src/lint/linter/xhpast/rules/__tests__/unsafe-dynamic-string/pht.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/unsafe-dynamic-string/pht.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/unsafe-dynamic-string/pht.lint-test
@@ -21,11 +21,11 @@
EOT
);
~~~~~~~~~~
-error:6:1
-error:8:1
-error:9:1
-error:11:1
-error:19:1
+error:6:1:XHP86:Unsafe Usage of Dynamic String
+error:8:1:XHP86:Unsafe Usage of Dynamic String
+error:9:1:XHP86:Unsafe Usage of Dynamic String
+error:11:1:XHP86:Unsafe Usage of Dynamic String
+error:19:1:XHP86:Unsafe Usage of Dynamic String
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/xhpast/rules/__tests__/unsafe-dynamic-string/xsprintf.lint-test b/src/lint/linter/xhpast/rules/__tests__/unsafe-dynamic-string/xsprintf.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/unsafe-dynamic-string/xsprintf.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/unsafe-dynamic-string/xsprintf.lint-test
@@ -3,7 +3,7 @@
csprintf('x');
csprintf($x);
~~~~~~~~~~
-error:4:1
+error:4:1:XHP86:Unsafe Usage of Dynamic String
~~~~~~~~~~
~~~~~~~~~~
{
diff --git a/src/lint/linter/xhpast/rules/__tests__/use-statement-namespace-prefix/use.lint-test b/src/lint/linter/xhpast/rules/__tests__/use-statement-namespace-prefix/use.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/use-statement-namespace-prefix/use.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/use-statement-namespace-prefix/use.lint-test
@@ -3,7 +3,7 @@
use X\Y\Z;
use \X\Y\Z;
~~~~~~~~~~
-warning:4:5
+warning:4:5:XHP97:`use` Statement Namespace Prefix
~~~~~~~~~~
<?php
namespace SomeNamespace;
diff --git a/src/lint/linter/xhpast/rules/__tests__/useless-overriding-method/useless-overriding-method.lint-test b/src/lint/linter/xhpast/rules/__tests__/useless-overriding-method/useless-overriding-method.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/useless-overriding-method/useless-overriding-method.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/useless-overriding-method/useless-overriding-method.lint-test
@@ -22,6 +22,6 @@
}
}
~~~~~~~~~~
-advice:4:3
-advice:8:3
-advice:16:3
+advice:4:3:XHP63:Useless Overriding Method
+advice:8:3:XHP63:Useless Overriding Method
+advice:16:3:XHP63:Useless Overriding Method
diff --git a/src/lint/linter/xhpast/rules/__tests__/variable-reference-spacing/function-call.lint-test b/src/lint/linter/xhpast/rules/__tests__/variable-reference-spacing/function-call.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/variable-reference-spacing/function-call.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/variable-reference-spacing/function-call.lint-test
@@ -4,8 +4,8 @@
$x = &
some_function();
~~~~~~~~~~
-warning:3:7
-warning:4:7
+warning:3:7:XHP123:Variable Reference Spacing
+warning:4:7:XHP123:Variable Reference Spacing
~~~~~~~~~~
<?php
$x = &some_function();
diff --git a/src/lint/linter/xhpast/rules/__tests__/variable-reference-spacing/variable.lint-test b/src/lint/linter/xhpast/rules/__tests__/variable-reference-spacing/variable.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/variable-reference-spacing/variable.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/variable-reference-spacing/variable.lint-test
@@ -4,8 +4,8 @@
$x = &
$c;
~~~~~~~~~~
-warning:3:7
-warning:4:7
+warning:3:7:XHP123:Variable Reference Spacing
+warning:4:7:XHP123:Variable Reference Spacing
~~~~~~~~~~
<?php
$x = &$a;
diff --git a/src/lint/linter/xhpast/rules/__tests__/variable-variable/variable-variables.lint-test b/src/lint/linter/xhpast/rules/__tests__/variable-variable/variable-variables.lint-test
--- a/src/lint/linter/xhpast/rules/__tests__/variable-variable/variable-variables.lint-test
+++ b/src/lint/linter/xhpast/rules/__tests__/variable-variable/variable-variables.lint-test
@@ -3,4 +3,4 @@
$$foo;
$obj->$bar; // okay
~~~~~~~~~~
-error:3:1
+error:3:1:XHP3:Use of Variable

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 30, 2:33 PM (6 d, 9 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7223617
Default Alt Text
D11176.id48960.diff (98 KB)

Event Timeline