Skip to content

cmd/vet: detect regexp.MustCompile guaranteed to fail #7895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rsc opened this issue Apr 29, 2014 · 3 comments
Closed

cmd/vet: detect regexp.MustCompile guaranteed to fail #7895

rsc opened this issue Apr 29, 2014 · 3 comments

Comments

@rsc
Copy link
Contributor

rsc commented Apr 29, 2014

regexp.MustCompile(literal-regexp) could be checked by vet to make sure the regexp
really does compile.
@dsymonds
Copy link
Contributor

Comment 1:

Other Dave was going to take a crack at this.

Labels changed: added repo-tools.

Owner changed to @okdave.

@ianlancetaylor
Copy link
Member

Comment 2:

Might as well check regexp.Compile with a string literal while you're at it--a bad
regexp there is worth a warning too.

@dsymonds
Copy link
Contributor

Comment 3:

It was decided not to do this.
https://golang.org/cl/98850043/

Status changed to WontFix.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
@rsc rsc unassigned okdave Jun 23, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants