Showing 11 of 11 total issues
Method deploy_flavors
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
def deploy_flavors(flavors, flavors_path)
trace "Deploying plugins...\n"
a_flavors_path = File.absolute_path(flavors_path)
lockfile_path = LockFile.path_from(a_flavors_path, false)
Method complete_a_flavor_itself
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def complete_a_flavor_itself(nf, lf, mode, level, requirer)
trace "#{' ' * level}Use #{nf.repo_name} ..."
already_cached = nf.cached?
nf.clone() unless already_cached
- 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 path_from
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def self.path_from(dir_path, warn)
flavorfile_path = dir_path.to_flavorfile_path
new_path = Pathname.new(flavorfile_path).relative_path_from(Pathname.getwd())
old_path = new_path.dirname() / 'VimFlavor'
- 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 complete_a_flavor
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def complete_a_flavor(nf, locked_flavor_table, mode, groups, level, requirer)
Method complete_flavors
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def complete_flavors(current_flavor_table, locked_flavor_table, mode, groups, level, requirer)
Method refresh_flavors
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def refresh_flavors(mode, flavorfile, lockfile, groups, flavors_path)
Method complete_a_flavor_dependencies
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def complete_a_flavor_dependencies(nf, locked_flavor_table, mode, groups, level)
Method complete_a_flavor_itself
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def complete_a_flavor_itself(nf, lf, mode, level, requirer)
Method deploy_flavors
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def deploy_flavors(flavors, flavors_path)
trace "Deploying plugins...\n"
a_flavors_path = File.absolute_path(flavors_path)
lockfile_path = LockFile.path_from(a_flavors_path, false)
- 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 choose_a_flavor
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def choose_a_flavor(nfg)
vs = nfg.map {|nf| nf.locked_version}.uniq
if vs.length == 1
nfg.first
else
- 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 test
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def test(files_or_dirs, options)
trace "-------- Preparing dependencies\n"
flavorfile_path = FlavorFile.path_from(Dir.getwd(), true)
flavorfile = FlavorFile.load_or_new(flavorfile_path)
- 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"