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

False positive in AssignmentInCondition #399

Closed
jonas054 opened this issue Jul 29, 2013 · 2 comments · Fixed by #403
Closed

False positive in AssignmentInCondition #399

jonas054 opened this issue Jul 29, 2013 · 2 comments · Fixed by #403
Assignees
Labels

Comments

@jonas054
Copy link
Collaborator

The checking of RuboCop's source code currently gives this output:

lib/rubocop/cli.rb:54:44: W: AssignmentInCondition: Assignment in condition - you probably meant to use ==.
        return 1 if any_errors? { offences = inspect_file(file) }

The assignment is in a block so I think it should not count.

@bbatsov
Copy link
Collaborator

bbatsov commented Jul 29, 2013

Yep, this is a bug. Feel free to fix it as I'm abroad on vacation. 


Cheers,
Bozhidar

On пн, юли 29, 2013 at 9:42 пр. об., Jonas Arvidsson <notifications@github.com="mailto:notifications@github.com">> wrote:
The checking of RuboCop's source code currently gives this output:

lib/rubocop/cli.rb:54:44: W: AssignmentInCondition: Assignment in condition - you probably meant to use ==.
return 1 if any_errors? { offences = inspect_file(file) }

The assignment is in a block so I think it should not count.


Reply to this email directly or view it on GitHub.

@ghost ghost assigned jonas054 Jul 29, 2013
@jonas054
Copy link
Collaborator Author

Hope you have a nice vacation! I'll take a look at the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants