We've found that we will often have many known-errors with the same help text and fix, but different regex patterns.
This has led to a lot of duplication in our known errors.
Currently, the pattern property only accepts a single string.
"pattern": {
"description": "A Regex used to determine if the line is an error.",
"type": "string"
}
If we had a patterns property that took an array, we could specify multiple regexes and remove the duplication in our known-errors.
We could replace pattern with patterns, but that would be a breaking change.
The other option would be to accept OneOf either a string or array of strings,
which would be a backward compatible change, but would also leaves us with the awkwardness of having the property named pattern.
"pattern": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
Obviously, we would need to update the code to loop through and look for any matching patterns.
We've found that we will often have many known-errors with the same help text and fix, but different regex patterns.
This has led to a lot of duplication in our known errors.
Currently, the
patternproperty only accepts a single string.If we had a
patternsproperty that took an array, we could specify multiple regexes and remove the duplication in our known-errors.We could replace
patternwithpatterns, but that would be a breaking change.The other option would be to accept
OneOfeither a string or array of strings,which would be a backward compatible change, but would also leaves us with the awkwardness of having the property named
pattern.Obviously, we would need to update the code to loop through and look for any matching patterns.