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.
Tags
None
Referenced Files
F15496908: D15000.diff
Sun, Apr 13, 8:43 AM
F15426340: D15000.id36236.diff
Sun, Mar 23, 8:03 AM
F15415122: D15000.id.diff
Thu, Mar 20, 4:12 AM
F15402832: D15000.diff
Tue, Mar 18, 12:35 AM
F15399931: D15000.id.diff
Mon, Mar 17, 8:36 AM
F15396951: D15000.id36238.diff
Sun, Mar 16, 5:10 PM
F15396637: D15000.id36240.diff
Sun, Mar 16, 3:30 PM
F15396109: D15000.id36236.diff
Sun, Mar 16, 11:56 AM
Subscribers
None

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
Branch
srex1
Lint
Lint Errors
SeverityLocationCodeMessage
Error.arclint:S&RXLint
Errorsrc/lint/linter/ArcanistScriptAndRegexLinter.php:S&RXLint
Unit
Tests Passed
Build Status
Buildable 10070
Build 12192: Run Core Tests
Build 12191: arc lint + arc unit

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.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
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.
  • 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.