Showing 2,015 of 18,390 total issues
Class MiqAlertController
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
class MiqAlertController < ApplicationController
before_action :check_privileges
before_action :get_session_data
after_action :cleanup_action
after_action :set_session_data
- Create a ticketCreate a ticket
Function TreeViewController
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
var TreeViewController = function($http, $scope) {
var vm = this;
vm.$http = $http;
vm.$scope = $scope;
vm.selectedNodes = {};
- Create a ticketCreate a ticket
Function createSchema
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createSchema(repositoryId) {
const fields = [
{
component: componentTypes.TEXT_FIELD,
label: __('Name'),
- Create a ticketCreate a ticket
Function createSchema
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createSchema(repositoryId) {
const fields = [
{
component: componentTypes.TEXT_FIELD,
label: __('Name'),
- Create a ticketCreate a ticket
Function createSchema
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createSchema(repositoryId) {
const fields = [
{
component: componentTypes.TEXT_FIELD,
label: __('Name'),
- Create a ticketCreate a ticket
Method widget_buttons
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
def widget_buttons
buttons = []
if role_allows?(:feature => "dashboard_add")
unless @sb[:dashboards][@sb[:active_db]][:locked]
buttons.push(:id => "w_#{@widget.id}_close",
- Create a ticketCreate a ticket
Function setUpAutomateImportClickHandlers
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
setUpAutomateImportClickHandlers: function() {
var tearDownGitImportOptions = function() {
$('select.git-branches').find('option').remove().end();
$('select.git-tags').find('option').remove().end();
$('select.git-branches').selectpicker('refresh');
- Create a ticketCreate a ticket
Method display_adv_search?
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
def display_adv_search?
%w[auth_key_pair_cloud
storage_service
storage_resource
host_initiator
- Create a ticketCreate a ticket
Function ErrorModalController
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function ErrorModalController($timeout) {
var $ctrl = this;
$ctrl.data = null;
$ctrl.error = null;
$ctrl.isHtml = false;
- 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 build_select_button
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def build_select_button(bgi, index)
bs_children = false
props = toolbar_button(bgi, :id => bgi[:id], :type => :buttonSelect)
return nil if props.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 center_toolbar_filename_automate_customization
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def center_toolbar_filename_automate_customization
if x_active_tree == :old_dialogs_tree
return @dialog ? "miq_dialog_center_tb" : "miq_dialogs_center_tb"
elsif x_active_tree == :dialogs_tree
if x_node == "root"
- 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 exp_add_not
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def exp_add_not(exp, token)
if exp[:token] && exp[:token] == token # If the token matches
exp.keys.each do |key| # Find the key
next if key == :token # Skip the :token key
next if exp[key].nil? # Check for the key already gone
- 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 group_reorder_set_form_vars
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def group_reorder_set_form_vars
@edit = {}
@edit[:new] = {}
@edit[:current] = {}
@edit[:key] = "group_reorder"
- 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 group_reorder_field_changed
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def group_reorder_field_changed
assert_privileges("ab_group_reorder")
if params['selected_fields']
return unless load_edit("group_reorder", "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 fields_form_field_changed
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def fields_form_field_changed
assert_privileges('miq_ae_field_edit')
return unless load_edit("aefields_edit__#{params[:id]}", "replace_cell__explorer")
fields_get_form_vars
- 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_show
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def ap_show
# identify_scanitemset
if @selected_scan.nil?
flash_to_session(_("Error: Record no longer exists in the database"), :error)
redirect_to(:action => 'show_list_set')
- 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 show
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def show
return if perfmenu_click?
return unless init_show
@center_toolbar = self.class.toolbar_singular if self.class.toolbar_singular
- 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 old_dialogs_button_operation
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def old_dialogs_button_operation(method, display_name)
dialogs = []
# Either a list or coming from a different controller (eg from host screen, go to its vms)
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 fetch_playbook_details
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def fetch_playbook_details
playbook_details = {}
provision = @record.config_info[:provision]
provisioning_details = {}
provisioning_details[:repository] = fetch_name_from_object(ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ConfigurationScriptSource, provision[:repository_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 open_parent_nodes
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def open_parent_nodes(record)
existing_node = nil # Init var
if record.kind_of?(OrchestrationTemplate)
parents = [:id => template_to_node_name(record)]
- 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"