Page MenuHomePhabricator

Allow Script-and-Regex linter to have optional/empty capturing patterns for char/line
ClosedPublic

Authored by epriestley on Oct 19 2015, 9:32 PM.
Tags
None
Referenced Files
F18089621: D14307.diff
Wed, Aug 6, 11:52 AM
Unknown Object (File)
Jun 20 2025, 8:35 AM
Unknown Object (File)
Jun 19 2025, 5:50 AM
Unknown Object (File)
May 25 2025, 6:33 AM
Unknown Object (File)
May 7 2025, 12:53 PM
Unknown Object (File)
May 1 2025, 11:52 PM
Unknown Object (File)
Apr 9 2025, 3:51 PM
Unknown Object (File)
Apr 9 2025, 7:26 AM

Details

Summary

See discussion in D13737. If you're using this linter to match messages which sometimes have a character, you can get "" (empty string) matches when the expression doesn't match. We'll complain about these later.

Instead, cast the matches the expected types.

Test Plan

@csilvers confirmed fix, see D13737.

Diff Detail

Repository
rARC Arcanist
Branch
srx
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 8348
Build 9578: Run Core Tests
Build 9577: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Allow Script-and-Regex linter to have optional/empty capturing patterns for char/line.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
epriestley added a subscriber: csilvers.
csilvers added a reviewer: csilvers.

ship it!!!!111!1!1

This revision is now accepted and ready to land.Oct 19 2015, 9:32 PM
This revision was automatically updated to reflect the committed changes.