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

Style/SpaceAfterNot doesn't catch not then parenthesis: ! (foo) #3043

Closed
cgriego opened this issue Apr 13, 2016 · 1 comment · Fixed by #3064
Closed

Style/SpaceAfterNot doesn't catch not then parenthesis: ! (foo) #3043

cgriego opened this issue Apr 13, 2016 · 1 comment · Fixed by #3064

Comments

@cgriego
Copy link
Contributor

cgriego commented Apr 13, 2016

Expected behavior

This code should have reported an offense for the Style/SpaceAfterNot cop:

@accept_success = ! (model.send(association).empty?)

Actual behavior

No offense was reported. After I ran and auto-corrected Style/RedundantParentheses, then an offense was reported for the auto-corrected code.

@accept_success = ! model.send(association).empty?

RuboCop version

0.39.0 (using Parser 2.3.0.7, running on ruby 1.9.3 x86_64-darwin14.0.0)

@rrosenblum
Copy link
Contributor

This should be an easy fix. Reducing down the problem, ! (model) does not register an offense either. I see that the cop is using regex, so that probably needs to be tweaked. I should be able to have a fix for this soon.

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 a pull request may close this issue.

2 participants