elm-analyse icon indicating copy to clipboard operation
elm-analyse copied to clipboard

Guidance on how to fix messages needed (Regex)

Open simonh1000 opened this issue 6 years ago • 1 comments

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?

simonh1000 avatar Sep 07 '17 16:09 simonh1000

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.

stil4m avatar Sep 11 '17 06:09 stil4m