Showing 10 of 24 total issues
File cli_spec.rb
has 324 lines of code (exceeds 250 allowed). Consider refactoring. Open
require_relative "spec_helper"
include CliTester
include GivenFilesystemSpecHelpers
Method run
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def run
failed_assertions = []
errored_assertions = []
skipped_assertions = []
- 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 run
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
failed_assertions = []
errored_assertions = []
skipped_assertions = []
Method parse
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def parse(config)
config.each do |key,value|
if key == "include"
included_file = value
configs_path = File.expand_path("../../../configs", __FILE__)
- 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 setup_config
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
def setup_config
config_file = File.join(@path, "yes_ship_it.conf")
if File.exist?(config_file)
out.puts "There already is a file `yes_ship_it.conf`."
Method parse_version
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def parse_version(file_name)
if file_name =~ /\.rb$/
File.read(file_name).each_line do |line|
if line =~ /VERSION = ['"](.*)['"]/
return $1
- 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 check
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def check
if !obs_project
raise AssertionError.new("OBS project is not set")
end
if !engine.release_archive
Method check
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def check
if !obs_project
raise AssertionError.new("OBS project is not set")
end
if !engine.release_archive
- 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 status
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def status
if !@status
g = git_status
if g =~ /working directory clean/
@status = "clean"
- 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 assert
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def assert(executor)
engine.out.puts "..."
old_files = []
@obs_package_files.each do |file|
- 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"