Showing 4 of 4 total issues
Method parse_options
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.parse_options(options)
defaults = {
date: Time.now,
dry: false,
no_git: false,
Method report_module_overview
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def report_module_overview
return if @level > ::Logger::INFO
header title: 'Version module overview', align: 'center', width: 80
table(border: true) do
- 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 commit
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def commit(version)
message = "Release version #{version}"
result = @options[:dry] ? 'Dry run success' : @git.commit(message)
if @logger
if result != ''
- 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 initialize
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def initialize(options = {})
@logger = ::Logger.new(options[:out] || STDOUT)
@logger.level = ::Logger::INFO
@logger.level = ::Logger::DEBUG if options[:verbose]
@logger.level = ::Logger::UNKNOWN if options[:silent]
- 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"