Skip to content

Add new Performance/ConstantRegexp cop#174

Merged
marcandre merged 1 commit intorubocop:masterfrom
fatkodima:constant_regexp
Oct 26, 2020
Merged

Add new Performance/ConstantRegexp cop#174
marcandre merged 1 commit intorubocop:masterfrom
fatkodima:constant_regexp

Conversation

@fatkodima
Copy link
Copy Markdown
Contributor

Closes #151

@marcandre, mentioning you as the original requestor :)

Copy link
Copy Markdown
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...

@fatkodima
Copy link
Copy Markdown
Contributor Author

Updated with suggestions.

@marcandre
Copy link
Copy Markdown
Contributor

Could you please rebase? We need this :-)

@fatkodima
Copy link
Copy Markdown
Contributor Author

Rebased.

@marcandre marcandre merged commit 05bddff into rubocop:master Oct 26, 2020
@marcandre
Copy link
Copy Markdown
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