Skip to content

Commit

Permalink
Merge pull request #563 from troessner/issue-553-rubocop-multiline-ch…
Browse files Browse the repository at this point in the history
…aining

Configure MultilineOperationIndentation cop
  • Loading branch information
Timo Rößner committed Jul 3, 2015
2 parents 0ac8e98 + 9eef2bd commit b5ac86f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .rubocop.yml
Expand Up @@ -18,6 +18,10 @@ Metrics/MethodLength:
Metrics/LineLength:
Max: 100

# Indent one level for follow-up lines
Style/MultilineOperationIndentation:
EnforcedStyle: indented

# Allow small arrays of words with quotes
Style/WordArray:
MinSize: 3
Expand Down
4 changes: 2 additions & 2 deletions lib/reek/configuration/app_configuration.rb
Expand Up @@ -56,8 +56,8 @@ def reset

def exclude_paths
@exclude_paths ||= @configuration.
fetch(EXCLUDE_PATHS_KEY, []).
map { |path| path.chomp('/') }
fetch(EXCLUDE_PATHS_KEY, []).
map { |path| path.chomp('/') }
end

private
Expand Down
2 changes: 1 addition & 1 deletion lib/reek/report/formatter.rb
Expand Up @@ -18,7 +18,7 @@ def self.format_list(warnings, formatter = SimpleWarningFormatter.new)
def self.header(examiner)
count = examiner.smells_count
result = Rainbow("#{examiner.description} -- ").cyan +
Rainbow("#{count} warning").yellow
Rainbow("#{count} warning").yellow
result += Rainbow('s').yellow unless count == 1
result
end
Expand Down
2 changes: 1 addition & 1 deletion lib/reek/smells/nested_iterators.rb
Expand Up @@ -66,7 +66,7 @@ def find_iters(exp, depth)
def find_iters_for_iter_node(exp, depth)
ignored = ignored_iterator? exp
result = find_iters(exp.call, depth) +
find_iters(exp.block, depth + (ignored ? 0 : 1))
find_iters(exp.block, depth + (ignored ? 0 : 1))
result << [exp, depth] unless ignored
result
end
Expand Down

0 comments on commit b5ac86f

Please sign in to comment.