Skip to content

Commit

Permalink
rubocop: fixed "Favor modifier if usage when having a single-line body"
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Nov 26, 2014
1 parent cc0cfc8 commit b5629d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
5 changes: 0 additions & 5 deletions .rubocop.yml
Expand Up @@ -67,11 +67,6 @@ Style/CommentAnnotation:
Style/Documentation:
Enabled: false

# Offense count: 2
# Configuration parameters: MaxLineLength.
Style/IfUnlessModifier:
Enabled: false

# Offense count: 12
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Expand Down
9 changes: 3 additions & 6 deletions src/lib/registration/ui/addon_selection_dialog.rb
Expand Up @@ -119,9 +119,8 @@ def addon_checkbox(addon, extra_spacing)

# usability help. If addon depends on something, then we get it
# immediatelly after parent, so indent it slightly, so it is easier visible
if addon.depends_on
checkbox = HBox(HSpacing(2.5), checkbox)
end
checkbox = HBox(HSpacing(2.5), checkbox) if addon.depends_on

res = [checkbox]
# add extra spacing when there are just few addons, in GUI always
res << VSpacing(0.7) if extra_spacing
Expand Down Expand Up @@ -163,9 +162,7 @@ def handle_dialog
end

def handle_next_button
if !supported_addon_count?
return nil
end
return nil unless supported_addon_count?

log.info "Selected addons: #{Addon.selected.map(&:name)}"

Expand Down

0 comments on commit b5629d8

Please sign in to comment.