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

[Backport] Fix literal as condition #3313

Merged
merged 2 commits into from
Feb 18, 2019
Merged

Conversation

javierm
Copy link
Member

@javierm javierm commented Feb 15, 2019

References

Objectives

  • Remove a syntax mistake which made a condition always evaluate to true
  • Enable a rubocop rule so we are warned when we accidentally introduce similar conditions

The right syntax would have been:

`after_save :recalculate_heading_winners, if: :incompatible_changed?`

However, since the method `recalculate_heading_winners` already executes
the `if incompatible_changed?` condition, removing it keeps the intended
behaviour.
This way deverlopers who don't run the ruby syntax check locally with
warnings enabled will be informed by HoundCI.
@javierm javierm merged commit 44483c2 into master Feb 18, 2019
@javierm javierm deleted the backport-fix_literal_as_condition branch February 18, 2019 17:58
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.

None yet

2 participants