Page MenuHomePhabricator

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

Authored by epriestley on Jan 12 2016, 1:24 AM.

Details

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.

Diff Detail

Repository
rARC Arcanist
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley retitled this revision from to If the Script-and-Regex linter captures no "line" text, treat the message as affecting the entire file.Jan 12 2016, 1:24 AM
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
epriestley updated this revision to Diff 36236.
chad edited edge metadata.Jan 12 2016, 1:28 AM
chad accepted this revision.
chad added inline comments.
src/lint/linter/ArcanistScriptAndRegexLinter.php
1

I feel like there should be something spinning here.

This revision is now accepted and ready to land.Jan 12 2016, 1:28 AM
epriestley edited edge metadata.Jan 12 2016, 1:29 AM
epriestley updated this revision to Diff 36238.
  • Remove example changes to .arclint now that we've all had a right jolly giggle.
This revision was automatically updated to reflect the committed changes.