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

staticcheck: improve and enable CheckSillyRegexp #485

Open
dominikh opened this issue May 18, 2019 · 0 comments
Open

staticcheck: improve and enable CheckSillyRegexp #485

dominikh opened this issue May 18, 2019 · 0 comments

Comments

@dominikh
Copy link
Owner

CheckSillyRegexp flags regular expressions that do not contain any meta characters. Such regexps can often be replaced with simpler string functions. The reason the check isn't currently enabled is that the user may be required to use a regexp because they're using a third party API that only accepts regexps.

We should improve the check (some basic data flow analysis to see if the regexp flows into a regexp matching function in the same package), and possibly make it a quickfix check instead of a staticcheck one.

@dominikh dominikh changed the title staticcheck: decide fate of CheckSillyRegexp staticcheck: improve and enable CheckSillyRegexp May 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant