Implement an analysis check that statically validates a string literal pattern
argument to find
, matches
, and sub
is a valid regex.
#253
Labels
enhancement
New feature or request
If the
pattern
argument to thefind
,matches
, andsub
WDL standard library functions are string literals, we can easily check to see that the pattern compiles as a regex and, if not, emit a diagnostic. It's quite common to use a string literal for the pattern too.I'm leaning towards doing that in a lint rather than analysis, although a lint warning seems wrong as it could lead to a runtime evaluation error.
The text was updated successfully, but these errors were encountered: