Showing 5 of 7 total issues
Class Repository
has 40 methods (exceeds 20 allowed). Consider refactoring. Open
class Repository
attr_reader :location
attr_reader :log_output
attr_reader :log_error
Method command
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def command
command = 'branch '
if @mode == :create
command += "#{@name} #{@commit.nil? ? '' : @commit}"
- 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 command
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def command
command = "log -i --format=\"<log>#{xml_structure}</log>\""
command += " #{@commit}" if @commit
command += " --author \"#{@author}\"" if @author
command += " --since \"#{@since}\"" if @since
- 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 command
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def command
command = "rev-list HEAD -i #{@count ? ' --count ' : ''}"
command += " --author \"#{@author}\"" if @author
command += " --since \"#{@since}\"" if @since
command += " --until \"#{@until}\"" if @until
- 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 command
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def command
command = 'tag '
if @mode == :create
command += "#{@name} #{@commit.nil? ? '' : @commit}"
- 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"