Page MenuHomePhabricator

Validate regular expressions in `differential.generated-paths`
Closed, ResolvedPublic

Description

Some general issues here:

  • We don't validate regexps in differential.generated-paths, or other config which takes regexps. We can and should.
  • For config of type list<string>, we provide a simplified editor ("one value per line") but it's fairly easy to confuse this with the JSON editor used for map<string, x> since they look the same and function very similarly.
  • The examples for differential.generated-paths show JSON, which is not correct for the web editor.

Possibly we should remove the specialized list<string> editor and just make you enter JSON.

Revisions and Commits

Restricted Differential Revision

Event Timeline

epriestley triaged this task as Normal priority.Sep 6 2013, 3:59 PM
epriestley added a project: Setup.
epriestley added subscribers: epriestley, staticshock.

T3822 is similar, but specifically hits the issue that getStrList() considers commas to be a token delimiter, which prevents them from being used in regexps. We should not treat them as delimiters in config of this type, and maybe not in any list<...> config.

Closed by commit rP7a39ac43b48c.

Thanks for the fix. For the records, the following works

/([Ff]ix|[Cc]omment):(\s*,*\s*\d+)+/
/(\d+)/

for

Fix: 123, 234
comment: 123 234

chad changed the visibility from "All Users" to "Public (No Login Required)".Jul 19 2015, 4:16 AM