Skip to content
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

Add exception for other RegExp related constants #42

Open
JDeuce opened this issue May 4, 2023 · 1 comment
Open

Add exception for other RegExp related constants #42

JDeuce opened this issue May 4, 2023 · 1 comment

Comments

@JDeuce
Copy link

JDeuce commented May 4, 2023

I have some code like this:

var (
	someRegex        = regexp.MustCompile(`(?P<foo>[.+])`)
	someRegexIndex    = someRegex.SubexpIndex("foo")
)

which the linter considers OK on the regexp.MustCompile line but not on the SubexpIndex line.
Not sure it's an easy decision to add this as I know there's a slippery slope here, just wanted to share for discussion relating to #41

@gandarez
Copy link

I have kinda the same problem. Any variable of type *regexp.Regexp is ignore and a map is an issue for this linter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants