Skip to content

invalid-regexp

Default severity: error

Reports invalid constant patterns passed to regular-expression compilation and matching functions. Dynamic patterns are checked at runtime by the standard library and are not reported.

regexp.MustCompile(`[a-z`)
regexp.MustCompile(`[a-z]+`)