GothenburgBitFactory / GothenburgBitFactory/taskwarrior
[TW-1602] allow UDA string types to be checked for compliance with a regex
- Dominant language
- C++
- Stars
- 6.1k
- Forks
- 423
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 11
Description
_Scott Mcdermott on 2015-04-25T21:07:50Z says:_
Currently, for `uda.foo.string` we can set `uda.foo.values` to configure an approved list of strings.
It would be useful to support a regular expression here in addition to a list, to enforce a string format policy for a UDA (such as, all lower case values, no spaces, less than a certain length, etc, all easy with a regex). While I could enforce the policy manually for any instance of the UDA I create, a mistake/error will mean my data does not conform, and I will have to run some integrity checker manually to test all the values for compliance, before working with those data.
Suggest `uda.foo.regex` that could be set to a regular expression. Now Taskwarrior will disallow any set of the UDA which doesn't match the defined regular expression.
Another alternative is maybe to let `uda.foo.values` start with '/' or '~' and then a regex will follow, or something like this.
Contributor guide
Assessment
This issue has not been assessed yet.