elm-analyse
elm-analyse copied to clipboard
Guidance on how to fix messages needed (Regex)
I got the non static regex error a few times, but https://stil4m.github.io/elm-analyse/#/messages/NonStaticRegex doesn't really help me to understand what the problem is and what the fix is. Is it possible to augment the docs a little?
Fair point :).
Regexes could cause runtime exceptions. This is the meta issue. To limit this, you can define regexes as top level expressions such that these evaluate when your JS is loaded in the browser. This way you get a runtime exception directly or not at all, but never when your end user enters a corner case.
The docs need some improvements in general. Currently, I do not have that much time so if you want to help me out with a PR, I would be really happy.