Showing 191 of 268 total issues
Method find_subjects
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.find_subjects(net, env)
net.arcs.each do |arc|
source_transition = net.find_transition(arc.source_id)
source_place = net.find_place(arc.source_id)
target_transition = net.find_transition(arc.target_id)
- 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 apply_touch_operation
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def apply_touch_operation(condition, tuples)
_condition = condition.eval(@env)
if _condition.operation == :touch or (self.kind_of?(EmptyHandler) and _condition.operation == :write)
if tuples.empty?
create_data_by_touch_operation(_condition)
- 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 from_array
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def from_array(ary)
raise TupleFormatError.new(ary) unless ary.size > 0
raise TupleFormatError.new(ary) unless ary.respond_to?(:to_a)
_ary = ary.to_a
identifier = _ary.first
- 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 split
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def split(uri)
scheme = uri.split(":").first
# special schemes
case scheme
- 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 create_task_worker
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def create_task_worker(tuple_space)
res = true
@task_worker_lock.synchronize do
@spawnings += 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 call_pione_method
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def call_pione_method(env, name, args)
# check arguments
raise ArgumentError.new(args) unless args.is_a?(Array)
if pione_method = pione_type(env).find_method(env, name, self, args)
- 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 find_scenario
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def find_scenario(name)
@info.scenarios.each do |path|
if name == :anything
# read first hit scenario
return ScenarioReader.read(@location + 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"
Further reading
Method scan_data_dir
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def scan_data_dir(name)
if (@location + name).exist?
(@location + name).file_entries.each_with_object([]) do |entry, target|
unless /^\./.match(entry.basename)
target << File.join(name, entry.basename)
- 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 normalize
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def normalize
hash = {
:scheme => "myftp",
:userinfo => userinfo || Util::FTPServer.auth_info.to_userinfo,
:host => (host == "myself" or host.nil?) ? Util::IPAddress.myself : host,
- 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 []
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def [](address)
if address.kind_of?(Hash)
return create_git_repository_location(address) if address[:git]
return create_data_location(address[:data]) if address[:data]
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 find_ancestor_ids
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def find_ancestor_ids(package_id)
ancestor_ids = []
if package = package_get(PackageExpr.new(package_id: package_id))
ancestor_ids += package.parent_ids
package.parent_ids.each do |parent_id|
- 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"