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 new Performance/ConstantRegexp cop #174

Merged
merged 1 commit into from Oct 26, 2020

Conversation

fatkodima
Copy link
Contributor

Closes #151

@marcandre, mentioning you as the original requestor :)

Copy link
Contributor

@marcandre marcandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

Two nitpicks, and one additional request: could we also flag /...#{Regexp.escape(CONST)}.../?
I can't think of other method calls I would expect to see...

lib/rubocop/cop/performance/constant_regexp.rb Outdated Show resolved Hide resolved
@fatkodima
Copy link
Contributor Author

Updated with suggestions.

@marcandre
Copy link
Contributor

Could you please rebase? We need this :-)

@fatkodima
Copy link
Contributor Author

Rebased.

@marcandre marcandre merged commit 05bddff into rubocop:master Oct 26, 2020
@marcandre
Copy link
Contributor

Awesome, thanks!

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

Successfully merging this pull request may close these issues.

Missing Cop for constant regexp?
2 participants