Method report_methods
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def report_methods cm
return if cm.method_list.empty?
report = []
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Class Stats
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class RDoc::Stats
include RDoc::Text
##
File stats.rb
has 264 lines of code (exceeds 250 allowed). Consider refactoring. Open
class RDoc::Stats
include RDoc::Text
##
Method summary
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def summary
calculate
num_width = [@num_files, @num_items].max.to_s.length
undoc_width = [
Method report_class_module
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def report_class_module cm
return if cm.fully_documented? and @coverage_level.zero?
return unless cm.display?
report = RDoc::Markup::Document.new
Method report_class_module
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def report_class_module cm
return if cm.fully_documented? and @coverage_level.zero?
return unless cm.display?
report = RDoc::Markup::Document.new
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method calculate
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
def calculate
return if @doc_items
ucm = @store.unique_classes_and_modules
Method report
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def report
if @coverage_level > 0 then
extend RDoc::Text
end
Method report
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def report
if @coverage_level > 0 then
extend RDoc::Text
end
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method report_constants
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def report_constants cm
return if cm.constants.empty?
report = []
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method report_attributes
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def report_attributes cm
return if cm.attributes.empty?
report = []
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"