Skip to content

Commit

Permalink
avoid self assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Jan 14, 2015
1 parent babb257 commit 1f2295c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
4 changes: 0 additions & 4 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@ Style/MethodName:
Style/PredicateName:
Enabled: false

# Offense count: 2
Style/SelfAssignment:
Enabled: false

# Offense count: 7
# Cop supports --auto-correct.
# Configuration parameters: AllowAsExpressionSeparator.
Expand Down
2 changes: 1 addition & 1 deletion library/cwm/src/modules/CWM.rb
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ def validateWidgets(widgets, event)
result = true
Builtins.foreach(widgets) do |w|
widget_key = Ops.get_string(w, "_cwm_key", "")
result = result && validateWidget(w, event, widget_key)
result &&= validateWidget(w, event, widget_key)
end
if !result && !@validation_failed_handler.nil?
@validation_failed_handler.call
Expand Down
3 changes: 1 addition & 2 deletions library/general/src/modules/ConfigHistory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,7 @@ def CheckChangedFilesOutOfVersionControl
)
)
end
@commit_needed = @commit_needed ||
Ops.greater_than(Builtins.size(files), 0)
@commit_needed ||= Ops.greater_than(Builtins.size(files), 0)
if Ops.greater_than(Builtins.size(files), 0)
param = Builtins.mergestring(files, " ")
out = Convert.to_map(
Expand Down

0 comments on commit 1f2295c

Please sign in to comment.