Page MenuHomePhabricator

Modify the `lint-test` file format to allow for assertions against linter codes
Closed, ResolvedPublic

Description

Currently, the lint-test format is roughly as follows:

${text}
~~~~~~~~~~
${severity}:${line}:${char}
...
~~~~~~~~~~
${transformed_text}
~~~~~~~~~~
{
  "hook": "optional bool",
  "config": "optional map<string, wild>",
  "path": "optional string"
}

This file format is 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. I think that this format should be generalised, to allow the code and name to be specified as well.

Revisions and Commits

Restricted Differential Revision

Event Timeline

joshuaspence raised the priority of this task from to Low.
joshuaspence updated the task description. (Show Details)
joshuaspence added a project: Lint.
joshuaspence updated the task description. (Show Details)
joshuaspence added a subscriber: joshuaspence.
joshuaspence added a revision: Restricted Differential Revision.Jan 3 2015, 8:00 AM
joshuaspence closed this task as Resolved by committing Restricted Diffusion Commit.May 21 2019, 3:48 AM
joshuaspence added a commit: Restricted Diffusion Commit.
joshuaspence added a revision: Restricted Differential Revision.May 21 2019, 8:02 AM