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

Disabling RSpec Cops within Source Code doesn't work with rubocop 0.41.1 #112

Closed
baschtl opened this issue Jun 27, 2016 · 3 comments
Closed

Comments

@baschtl
Copy link

baschtl commented Jun 27, 2016

Hi,

we use some inline disabling of rubocop in our code (i.e., # rubocop:disable RSpec/AnyInstance). After we updated from rubocop 0.40.0 to rubocop 0.41.1 this does not work anymore for RSpec cops provided by this gem.

We use rubocop-rspec 1.5.0.

Does somebody know what changed here?

@tjwp
Copy link
Contributor

tjwp commented Jun 27, 2016

I think the problem is the change made here to allow arbitrary comments after inline disabling:

https://github.com/bbatsov/rubocop/pull/3201/files#diff-aaa82a90d90f9a0d9c9c4048a224fde2R10

The new regexp ([A-Z][a-z]+/)?(?:[A-Z][a-z]+)+ is too restrictive and does not allow RSpec.

@tjwp
Copy link
Contributor

tjwp commented Jun 27, 2016

Opened a PR for rubocop: rubocop/rubocop#3250

@backus
Copy link
Collaborator

backus commented Aug 3, 2016

Since it looks like @tjwp's contribution to rubocop was merged I'm going to close this. @baschtl please reopen if you disagree

@backus backus closed this as completed Aug 3, 2016
@backus backus reopened this Aug 3, 2016
@backus backus closed this as completed Aug 3, 2016
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

3 participants