Showing 88 of 88 total issues
Method add_node_weight
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def add_node_weight(node, path)
path << node[:name]
node[:calls].each do |item_name|
next if path.include?(item_name)
- 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 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(uid, parent_uid, name, description, tags = [], order_in_parent = 0, body = [])
Method initialize
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(name, description = '', test_plan = TestPlan.new, scenarios = Scenarios.new, actionwords = Actionwords.new, tests = Tests.new, libraries = Libraries.new)
Method organize_folders
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def organize_folders
@children[:root_folder] = @children[:folders].find(&:root?)
@children[:root_folder].parent = self if @children[:root_folder]
@children[:folders].each do |folder|
- 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 push_query_parameters
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def push_query_parameters
parameters = {}
unless cli_options.execution_environment.strip.empty?
parameters['execution_environment'] = cli_options.execution_environment
end
- 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 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(name, tags = [], parameters = [], body = [], uid = nil, description = '')
Method show_languages
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def self.show_languages
puts I18n.t('help.languages.supported_languages')
languages.each do |language, frameworks|
puts "#{language}:"
if frameworks.empty?
- 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 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(name, tags = [], parameters = [], body = [], uid = nil, description = '')
Method check_language_and_only
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def check_language_and_only
if present?(cli_options.language)
begin
language_config_parser = LanguageConfigParser.new(cli_options)
rescue ArgumentError => err
- 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 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(short, long, default, type, help, attribute)
Method as_hh_join
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def as_hh_join(context, items, joiner, name, block, else_block = nil)
Method display
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def display
return export_as_json if @cli_options.actionwords_diff_json && @cli_options.output_directory
return display_as_json if @cli_options.actionwords_diff_json
return display_deleted if @cli_options.aw_deleted
return display_created if @cli_options.aw_created
- 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 hh_if_includes
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def hh_if_includes(context, expression, element, block_true, block_false = nil)
Method hh_join
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def hh_join(context, items, joiner, block, else_block = nil)
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(name, tags = [], description = '', parameters = [], body = [])
Method fetch_project_export_asynchronously
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def fetch_project_export_asynchronously
publication_export_id = fetch_asynchronous_publication_export_id
url = "#{base_publication_path}/async_project/#{publication_export_id}"
response = nil
- 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 make_language_group_config
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def make_language_group_config group_name
# List of options that can be set in the config file but not in command line
non_visible_options = {
package: @cli_options.package,
meta: meta,
- 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 each_direct_children
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def each_direct_children
children.each_value do |child|
if child.is_a? Hiptest::Nodes::Node
yield child
elsif child.is_a? Array
- 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 fetch_project
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def fetch_project
cached = export_cache.cache_for(url)
unless cached.nil?
@reporter.with_status_message I18n.t(:using_cached_data) 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 replace_parameter_value_with_type
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def replace_parameter_value_with_type(collection, parameters)
collection.map do |obj|
if obj[:is_parameter]
parameter = parameters.find { |parameter| parameter.children[:name] == obj[:name] }
obj[:typed_value] = parameter ? "{#{parameter.type.downcase}}" : "{}"
- 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"