Method init
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
def init(rootdir = Dir.pwd, name = '', _options = {})
config = {}
#login = `whoami`.chomp
config[:name] = name unless name.empty?
moduledir = rootdir
- 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
File modules.rb
has 312 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "falkorlib"
require "falkorlib/common"
require "pathname"
require 'json'
Method metadata
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def metadata(moduledir = Dir.pwd, options = {
:use_symbols => true,
:extras => true,
:no_interaction => 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 init
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
def init(rootdir = Dir.pwd, name = '', _options = {})
config = {}
#login = `whoami`.chomp
config[:name] = name unless name.empty?
moduledir = rootdir
Method upgrade
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def upgrade(moduledir = Dir.pwd,
options = {
:no_interaction => false,
:only => nil,
:exclude => []
- 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 deps
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def deps(moduledir = Dir.pwd)
name = File.basename( moduledir )
error "The module #{name} does not exist" unless File.directory?( moduledir )
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 parse
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
def parse(moduledir = Dir.pwd, options = {
:no_interaction => false
})
name = File.basename(moduledir)
metadata = metadata(moduledir, :use_symbols => false,
Method metadata
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def metadata(moduledir = Dir.pwd, options = {
:use_symbols => true,
:extras => true,
:no_interaction => false
})
Method upgrade
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def upgrade(moduledir = Dir.pwd,
options = {
:no_interaction => false,
:only => nil,
:exclude => []
Method parse
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def parse(moduledir = Dir.pwd, options = {
:no_interaction => false
})
name = File.basename(moduledir)
metadata = metadata(moduledir, :use_symbols => 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 upgrade_from_template
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def upgrade_from_template(moduledir = Dir.pwd,
subdir = 'tests',
options = {
:no_interaction => 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"