Showing 18,390 of 18,390 total issues
Function ValidateStorageCredentials
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const ValidateStorageCredentials = ({ ...props }) => {
const { storageId } = useContext(EditingContext);
const asyncValidate = (fields, fieldNames) => new Promise((resolve, reject) => {
const url = storageId ? `/api/physical_storages/${storageId}` : '/api/physical_storages';
- 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 layout_uses_listnav?
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def layout_uses_listnav?
return false if action_name == "show"
return false if show_list_with_no_provider?
return false if show_list_ansible?
- 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 create_custom_button
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def create_custom_button(input, model, record)
button_id = input[:id]
button_name = input[:name].to_s
record_id = if cb_send_checked_list
'LIST'
- 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 textual_object_link
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def textual_object_link(object, as: nil, controller: nil, feature: nil, label: nil)
return if object.nil?
klass = as || ui_base_model(object.class)
- 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 twostate_button_selected
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def twostate_button_selected(id)
return true if id.starts_with?("view_") && id.ends_with?("textual") # Summary view buttons
return true if @ght_type && id.starts_with?("view_") && id.ends_with?(@ght_type) # GHT view buttons on report show
return true if id.starts_with?("compare_") && id.ends_with?(settings(:views, :compare).to_s)
return true if id.starts_with?("drift_") && id.ends_with?(settings(:views, :drift).to_s)
- 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 settings_schedule_filter_details
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def settings_schedule_filter_details(schedule, exp_table)
data = {
:title => _('Filter'),
:mode => "settings_schedule_filter_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 perf_remove_report_cols
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def perf_remove_report_cols(report, charts = nil)
charts ||= @charts.first
new_rpt = MiqReport.new(report.attributes) # Make a copy of the report
new_rpt.table = Marshal.load(Marshal.dump(report.table))
keepcols = []
- 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 calculate_toolbars
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def calculate_toolbars
toolbars = {}
if display_back_button? # taskbar branch
toolbars['summary_center_tb'] = controller.restful? ? "summary_center_restful_tb" : "summary_center_tb"
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 comp_add_record_field_exists_compressed
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def comp_add_record_field_exists_compressed(idx, val, base_rec, field)
if @exists_mode
passed_img = "fa fa-check"
failed_img = "fa fa-times"
else
- 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_data_size
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def get_data_size(data, indent = 0)
begin
# TODO: (FB 9144) Determine how the session store handles singleton object so it does not throw errors.
data_size = Marshal.dump(data).size
rescue StandardError => err
- 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_record_field_compressed
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def drift_record_field_compressed(view, section, record, field)
basval = ""
row = {:col0 => field[:header].to_s}
view.ids.each_with_index do |id, idx|
- 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 comp_add_total
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def comp_add_total(view)
row = {
:col0 => "<span class='cell-effort-driven cell-plain'>" + _("Total Matches") + "</span>",
:id => "id_#{@rows.length}",
:total => true
- 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 comp_add_section_field_compressed
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def comp_add_section_field_compressed(view, section, field)
row = {}
base_val = view.results.fetch_path(view.ids[0], section[:name], field[:name], :_value_)
view.ids.each_with_index do |id, idx|
fld = view.results.fetch_path(id, section[:name], field[:name])
- 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 comp_add_record_field_exists_expanded
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def comp_add_record_field_exists_expanded(idx, val, base_rec, field)
if @exists_mode
passed_text_color = failed_text_color = "black"
else
passed_text_color = "#403990"
- 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 parent_folder_id
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def parent_folder_id(vm)
if vm.orphaned
"xx-orph"
elsif vm.archived
"xx-arch"
- 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 setup_presenter_for_old_dialogs_tree
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def setup_presenter_for_old_dialogs_tree(nodetype, presenter)
nodes = nodetype.split("_")
if nodetype == "root" || nodes[0].split('-').first != "odg"
partial = nodetype == 'root' ? 'old_dialogs_list' : 'layouts/x_gtl'
presenter.update(:main_div, render_proc[:partial => partial])
- 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 rebuild_toolbars
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def rebuild_toolbars(record_showing, presenter)
if !@in_a_form && !@sb[:action]
center_tb = center_toolbar_filename
c_tb = build_toolbar(center_tb)
- 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 custom_toolbar_explorer
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def custom_toolbar_explorer
if x_tree
if @display == "main" && @record
Mixins::CustomButtons::Result.new(:single)
elsif @lastaction == "show_list"
- 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_file
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def ap_get_form_vars_file
if params[:entry]['fname'].blank?
add_flash(_("File Entry is required"), :error)
return
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 delete_namespaces_or_classes
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def delete_namespaces_or_classes
selected = find_checked_items
ae_ns = []
ae_cs = []
node = x_node.split('-')
- 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"