Showing 71 of 88 total issues
Method normalize!
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def normalize!(reporter = nil)
self.uids = true if test_run? && uids_not_set_yet?
self.no_uids = !uids # silent normalization
modified_options = self.clone
if actionwords_only
Method set_call_chunks
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def set_call_chunks(call)
all_arguments = all_valued_arguments_for(call)
inline_parameter_names = []
extra_inlined_arguments = []
Method as_api
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def as_api
data = {}
data[:deleted] = @diff[:deleted].map {|aw|
{
Method set_actionwords_chunks
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def set_actionwords_chunks(actionword)
name = actionword.uniq_name
actionword_parameters = evaluated_map(actionword.children[:parameters])
name_chunks = name.split("\"", -1)
inline_parameter_names = []
Method display_summary
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def display_summary
command_line = @cli_options.command_line_used(exclude: [:actionwords_diff])
unless @diff[:deleted].nil?
puts I18n.t('actionwords_diff.summary.deleted', count: @diff[:deleted].length, command_line: command_line, list: displayable_list(@diff[:deleted]))
- 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 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
if @cli_options.check_version
return VersionChecker.check_version
end
Method make_language_group_config
has 30 lines of code (exceeds 25 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,
Method register_partials
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def register_partials
dirs.reverse_each do |path|
next unless File.directory?(path)
Dir.entries(path).select do |file_name|
file_path = File.join(path, file_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 node_name
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def node_name
if self[:node_name] == "tests" || self[:node_name] == "scenarios" || self[:group_name] == "tests"
@leafless_export ? :tests : :scenarios
elsif self[:node_name] == "actionwords" || self[:group_name] == "actionwords"
:actionwords
- 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 as_api
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def as_api
data = {}
data[:deleted] = @diff[:deleted].map {|aw|
{
- 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 compute_definition_changed
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def compute_definition_changed
@definition_changed_uids = []
@definition_changed = @current_uid.map do |uid, aw|
next if @old_uid[uid].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 config_path_for
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def self.config_path_for(cli_options)
config_name = if cli_options.framework.empty?
"#{cli_options.language}.conf"
else
"#{cli_options.language}-#{cli_options.framework}.conf"
- 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 show_status_message
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def show_status_message(message, status=nil)
status_icon = " "
output = STDOUT
if status == :success
Method initialize
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(name, description = '', tags = [], parameters = [], body = [], folder_uid = nil, datatable = Datatable.new, order_in_parent = 0)
Method run
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def run
if @cli_options.check_version
return VersionChecker.check_version
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 check_push_file
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def check_push_file
if cli_options.push && !cli_options.global_failure_on_missing_reports
agnostic_path = clean_path(cli_options.push)
globbed_files = Dir.glob(agnostic_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 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"