Showing 1,006 of 6,062 total issues
Function render
has 159 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render: function () {
var options = this.options,
target = this.target,
canvasWidth = this.canvasWidth,
canvasHeight = this.canvasHeight,
- Create a ticketCreate a ticket
Method deployment_check
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
Open
def deployment_check
ret = {}
# Only allow the upgrade for mariadb setup
# TODO: update the search if we allow multiple proposals
db_node = ::Node.find("roles:database-server").first
- 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
Function size
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.effects.effect.size = function( o, done ) {
// Create element
var original, baseline, factor,
el = $( this ),
- Create a ticketCreate a ticket
File blockui.js
has 423 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery blockUI plugin
* Version 2.66.0-2013.10.09
* Requires jQuery v1.7 or later
*
- Create a ticketCreate a ticket
File crowbar_service.rb
has 421 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
class CrowbarService < ServiceObject
attr_accessor :transition_save_node
def initialize(thelogger = nil)
super
- Create a ticketCreate a ticket
File update_nodes.rb
has 420 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
def find_node_boot_mac_addresses(node, admin_data_net)
# If we don't have an admin IP allocated yet, using node.macaddress is
# our best guess for the boot macaddress.
if admin_data_net.nil? || \
admin_data_net.interface_list.nil?
- Create a ticketCreate a ticket
Function parseDate
has 148 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parseDate: function (format, value, settings) {
if (format == null || value == null) {
throw "Invalid arguments";
}
- Create a ticketCreate a ticket
Function position
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.position = function( options ) {
if ( !options || !options.of ) {
return _position.apply( this, arguments );
}
- Create a ticketCreate a ticket
Function __module2__
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var __module2__ = (function(__dependency1__, __dependency2__) {
"use strict";
var __exports__ = {};
/*globals Exception, Utils */
var Utils = __dependency1__;
- Create a ticketCreate a ticket
Class RoleObject
has 42 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class RoleObject < ChefObject
self.chef_type = "role"
def cluster_roles(roles = RoleObject.all)
@cluster_roles ||= begin
- Create a ticketCreate a ticket
Method proposal_update
has 137 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def proposal_update
if params[:submit].nil?
#
# This is RESTFul path
#
- Create a ticketCreate a ticket
Method transition
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
Open
def transition(inst, name, state)
Rails.logger.debug("IPMI transition: entering: #{name} for #{state}")
# discovering because mandatory for discovery image
if ["discovering", "readying"].include? state
- 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
Function _create
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
this.element.closest( "form" )
.unbind( "reset" + this.eventNamespace )
.bind( "reset" + this.eventNamespace, formResetHandler );
- Create a ticketCreate a ticket
Class Proposal
has 40 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Proposal < ActiveRecord::Base
# FIXME: remove this when the export is properly implemented
class_attribute :chef_type
self.chef_type = "data_bag_item"
- Create a ticketCreate a ticket
Class UpgradeStatus
has 40 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class UpgradeStatus
attr_reader :progress_file_path
attr_accessor :progress
# Return the current state of upgrade process.
- Create a ticketCreate a ticket
Function readFiles
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
readFiles: function (files) {
this.reader = new FileReader();
var self = this, $el = self.$element, $preview = self.$preview, reader = self.reader,
$container = self.$previewContainer, $status = self.$previewStatus, msgLoading = self.msgLoading,
msgProgress = self.msgProgress, previewInitId = self.previewInitId, numFiles = files.length,
- Create a ticketCreate a ticket
Function render
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render: function () {
var target = this.target,
values = this.values,
vlen = values.length,
options = this.options,
- Create a ticketCreate a ticket
Function Callbacks
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.Callbacks = function( options ) {
// Convert options from String-formatted to Object-formatted if needed
// (we check in cache first)
options = typeof options === "string" ?
- Create a ticketCreate a ticket
File migrate.js
has 379 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery Migrate - v1.2.1 - 2013-05-08
* https://github.com/jquery/jquery-migrate
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
*/
- Create a ticketCreate a ticket
File dynamicTable.js
has 379 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
;(function($, doc, win) {
'use strict';
function DynamicTable(el, options) {
this.root = $(el);
- Create a ticketCreate a ticket