HomePhabricator

If the Script-and-Regex linter captures no "line" text, treat the message as…

Description

If the Script-and-Regex linter captures no "line" text, treat the message as affecting the entire file

Summary: Fixes T10124.

Test Plan:
Added this "linter" to .arclint:

"thing": {
  "type": "script-and-regex",
  "script-and-regex.script": "echo every file is very bad #",
  "script-and-regex.regex": "/^(?P<message>.*)/"
}

...to produce this diff. Also made a variant of it which matches lines to make sure that still works.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10124

Differential Revision: https://secure.phabricator.com/D15000