mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-03-25 02:31:16 +01:00
Summary: Fixes T6854. The current format for `lint-test` files is somewhat inflexible and does not allow us to make assertions regarding the code or name of the linter messages (of class `ArcanistLintMessage`) that are raised. Specifically, the `${severity}:${line}:${char}` format is hardcoded in `ArcanistLinterTestCase`. In this diff, I extend the this format to achieve the following goals: - Allow for the lint message code and name to be specified. Specifically, the full format is `${severity}:${line}:${char}:${code}:${name}`. - Make all fields optional. `error:3:` will match any and all errors occuring on line 3. - Provide more useful output when assertions fail. Specifically, output //all// lint messages that are missing and/or surplus. Previously, only the first lint message was output. Test Plan: `arc unit` Reviewers: #blessed_reviewers, epriestley, chad Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6854 Differential Revision: https://secure.phabricator.com/D11176
7 lines
96 B
Text
7 lines
96 B
Text
<?php
|
|
|
|
function f() {
|
|
$this = "cannot be re-assigned";
|
|
}
|
|
~~~~~~~~~
|
|
error:4:0:PHP2:Fatal Error
|