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
F19713496: D14307.id.diff
Wed, Feb 11, 11:12 PM
F19672758: D14307.id.diff
Sun, Feb 8, 3:57 AM
F19552459: D14307.diff
Thu, Jan 29, 12:27 AM
F19519648: D14307.id.diff
Jan 16 2026, 7:07 AM
F19022013: D14307.diff
Nov 23 2025, 8:11 PM
F19002130: D14307.diff
Nov 21 2025, 5:06 AM
F18993266: D14307.diff
Nov 19 2025, 7:23 AM
F18779433: D14307.id34536.diff
Oct 11 2025, 1:58 PM

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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.