Showing 2,015 of 18,390 total issues
Method resolve_button_throw
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def resolve_button_throw
if valid_resolve_object?
add_flash(_("Automation Simulation has been run"))
@sb[:name] = @resolve[:new][:instance_name].presence || @resolve[:new][:other_name]
@sb[:attrs] = {}
- Read upRead up
- Create a ticketCreate a ticket
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 drift_to_json
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def drift_to_json(view)
@rows = []
@cols = []
@layout = view.report.db == "VmOrTemplate" ? @sb[:compare_db].underscore : view.report.db.underscore
@compressed = session[:miq_compressed]
- Read upRead up
- Create a ticketCreate a ticket
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 tl_gen_timeline_data
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def tl_gen_timeline_data(refresh = nil)
tl_build_timeline(refresh)
tl_build_timeline_report_options
@timeline = true unless @report # need to set this incase @report is not there, when switching between Management/Policy events
if @report
- Read upRead up
- Create a ticketCreate a ticket
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 get_form_vars
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def get_form_vars
if params.key?(:starting_object)
@resolve[:new][:starting_object] = params[:starting_object]
@resolve[:new][:instance_name] = nil
end
- Read upRead up
- Create a ticketCreate a ticket
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 rbac_and_user_make_subarrays
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def rbac_and_user_make_subarrays
if @set_filter_values.present?
temp1arr = []
@set_filter_values = @set_filter_values.flatten
temp_categories = @set_filter_values.dup
- Read upRead up
- Create a ticketCreate a ticket
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 tasks_scopes
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def tasks_scopes(opts, use_times = true)
scope = []
# Specify user scope
if @tabform == "tasks_1"
- Read upRead up
- Create a ticketCreate a ticket
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 ap_get_form_vars_registry
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def ap_get_form_vars_registry
unless params[:entry]['kname'].present? && params[:entry]['value'].present?
session[:reg_data] = {
:key => params[:entry]['kname'],
:value => params[:entry]['value'],
- Read upRead up
- Create a ticketCreate a ticket
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 delete_domain
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def delete_domain
assert_privileges("miq_ae_domain_delete")
aedomains = []
git_domains = []
if params[:id]
- Read upRead up
- Create a ticketCreate a ticket
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 policy_edit_save
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def policy_edit_save
assert_privileges("miq_policy_#{@policy.id ? "edit" : "new"}")
policy = @policy.id.blank? ? MiqPolicy.new : MiqPolicy.find(@policy.id) # Get new or existing record
policy.mode = @edit[:new][:mode]
policy.updated_by = session[:userid]
- Read upRead up
- Create a ticketCreate a ticket
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 rbac_group_seq_edit
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def rbac_group_seq_edit
assert_privileges("rbac_group_seq_edit")
case params[:button]
when "cancel"
@edit = nil
- Read upRead up
- Create a ticketCreate a ticket
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 rbac_edit_tags_reset
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def rbac_edit_tags_reset(tagging)
@object_ids = find_records_with_rbac(tagging.constantize, checked_or_params).ids
if params[:button] == "reset"
id = params[:id] if params[:id]
return unless load_edit("#{session[:tag_db]}_edit_tags__#{id}", "replace_cell__explorer")
- Read upRead up
- Create a ticketCreate a ticket
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 diagnostics_tree_select
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def diagnostics_tree_select
assert_privileges("ops_diagnostics")
typ, id = params[:id].split("-")
case typ
- Read upRead up
- Create a ticketCreate a ticket
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 cu_build_edit_screen
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def cu_build_edit_screen
@edit = {}
@edit[:new] = {}
@edit[:current] = {}
@edit[:key] = "cu_edit__collection"
- Read upRead up
- Create a ticketCreate a ticket
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 rbac_group_set_form_vars
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def rbac_group_set_form_vars
@assigned_filters = []
@group = @record
@edit = {
:new => {
- Read upRead up
- Create a ticketCreate a ticket
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 template_list
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def template_list
assert_privileges('customization_template_view')
@lastaction = "template_list"
@force_no_grid_xml = true
if params[:ppsetting] # User selected new per page value
- Read upRead up
- Create a ticketCreate a ticket
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 delete_networks
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def delete_networks
assert_privileges("cloud_network_delete")
networks = find_records_with_rbac(CloudNetwork, checked_or_params)
networks_to_delete = []
networks.each do |network|
- Read upRead up
- Create a ticketCreate a ticket
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 cb_rate_get_form_vars
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def cb_rate_get_form_vars
@edit[:new][:description] = params[:description] if params[:description]
if params[:rate_type]
@edit[:new][:rate_type] = params[:rate_type]
set_rate_details
- Read upRead up
- Create a ticketCreate a ticket
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 action_set_record_vars
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def action_set_record_vars(action)
action.description = @edit[:new][:description]
action.action_type = @edit[:new][:action_type]
@edit[:new][:options][:ae_hash] = {}
@edit[:new][:attrs]&.each do |pair|
- Read upRead up
- Create a ticketCreate a ticket
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 explorer
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def explorer
@explorer = true
@lastaction = "explorer"
@report_deleted = params[:report_deleted] == 'true' if params[:report_deleted]
@sb[:action] = nil
- Read upRead up
- Create a ticketCreate a ticket
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 session_init
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def session_init(db_user)
self.current_user = db_user
# Load settings for this user, if they exist
@settings = copy_hash(DEFAULT_SETTINGS) # Start with defaults
- Read upRead up
- Create a ticketCreate a ticket
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"