Skip to content

Commit

Permalink
Merge pull request #156 from Insti/Fix_rubocop_offenses
Browse files Browse the repository at this point in the history
Eliminate RuboCop offenses to make CI build pass.
  • Loading branch information
Timo Rößner authored Aug 4, 2016
2 parents 0f4f91c + 5c6ec18 commit 8ec40ed
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@ Style/ClassVars:
# SupportedStyles: use_perl_names, use_english_names
Style/SpecialGlobalVars:
Enabled: false

# Offense count: 1
Style/MethodMissing:
Exclude:
- 'lib/rubycritic/configuration.rb'

3 changes: 3 additions & 0 deletions .todo.reek
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,6 @@ UncommunicativeParameterName:
ClassVariable:
exclude:
- Rubycritic::SourceControlSystem::Base
BooleanParameter:
exclude:
- Rubycritic::Config#self.respond_to_missing?
4 changes: 4 additions & 0 deletions lib/rubycritic/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,9 @@ def self.set(options = {})
def self.method_missing(method, *args, &block)
configuration.public_send(method, *args, &block)
end

def self.respond_to_missing?(symbol, include_all = false)
configuration.respond_to_missing?(symbol) || super
end
end
end
2 changes: 1 addition & 1 deletion lib/rubycritic/core/analysed_module.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def rating
end

def complexity_per_method
if methods_count == 0
if methods_count.zero?
'N/A'
else
complexity.fdiv(methods_count).round(1)
Expand Down

0 comments on commit 8ec40ed

Please sign in to comment.