Project

General

Profile

Bug #16787

Fix rubocop error

Added by David Davis almost 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Tests
Target version:
-
Difficulty:
trivial
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

I noticed on a Katello PR that I had rubocop failures even though HoundCI passed my PR. Apparently HoundCI only checks lines that are edited and therefore, it's possible that rubocop errors might occur outside those lines. Perhaps this error happened when Hound upgraded to rubocop 0.42?

Offenses:

app/services/fact_importer.rb:87:7: C: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||.
      if facts_to_create.present?
      ^^

1821 files inspected, 1 offense detected

History

#1 Updated by The Foreman Bot almost 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3914 added

#2 Updated by David Davis almost 3 years ago

Looks like Dominic already opened a PR to fix this:

https://github.com/theforeman/foreman/pull/3896

#3 Updated by Dominic Cleal almost 3 years ago

  • Status changed from Ready For Testing to Resolved

Yes, thanks though.

Also available in: Atom PDF