Showing 1,006 of 6,062 total issues
Function CodeMirror
has a Cognitive Complexity of 1817 (exceeds 5 allowed). Consider refactoring. Open
var CodeMirror = (function() {
// This is the function that produces an editor instance. It's
// closure is used to store the editor state.
function CodeMirror(place, givenOptions) {
// Determine effective options based on given values and 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"
Further reading
File ui.js
has 11714 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*! jQuery UI - v1.10.3 - 2013-10-20
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
- Create a ticketCreate a ticket
File jquery.js
has 6841 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jQuery JavaScript Library v1.11.3
* http://jquery.com/
*
* Includes Sizzle.js
- Create a ticketCreate a ticket
Function Handlebars
has a Cognitive Complexity of 892 (exceeds 5 allowed). Consider refactoring. Open
var Handlebars = (function() {
// handlebars/safe-string.js
var __module4__ = (function() {
"use strict";
var __exports__;
- 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 Handlebars
has 1937 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Handlebars = (function() {
// handlebars/safe-string.js
var __module4__ = (function() {
"use strict";
var __exports__;
- Create a ticketCreate a ticket
Function CodeMirror
has 1835 lines of code (exceeds 25 allowed). Consider refactoring. Open
var CodeMirror = (function() {
// This is the function that produces an editor instance. It's
// closure is used to store the editor state.
function CodeMirror(place, givenOptions) {
// Determine effective options based on given values and defaults.
- Create a ticketCreate a ticket
File fileinput.js
has 2632 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2015
* @version 4.2.8
*
* File input styled for Bootstrap 3.0 that utilizes HTML5 File Input's advanced
- Create a ticketCreate a ticket
File sparkline.js
has 2443 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
*
* jquery.sparkline.js
*
* v2.1.2
- Create a ticketCreate a ticket
Function Sizzle
has 1355 lines of code (exceeds 25 allowed). Consider refactoring. Open
(function( window ) {
var i,
support,
Expr,
- Create a ticketCreate a ticket
Function CodeMirror
has 1287 lines of code (exceeds 25 allowed). Consider refactoring. Open
function CodeMirror(place, givenOptions) {
// Determine effective options based on given values and defaults.
var options = {}, defaults = CodeMirror.defaults;
for (var opt in defaults)
if (defaults.hasOwnProperty(opt))
- Create a ticketCreate a ticket
File handlebars.js
has 1939 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
handlebars v1.1.2
Copyright (C) 2011 by Yehuda Katz
- Create a ticketCreate a ticket
File upgrade.rb
has 1844 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "open3"
module Api
class Upgrade < Tableless
class << self
- Create a ticketCreate a ticket
File codemirror.js
has 1837 lines of code (exceeds 250 allowed). Consider refactoring. Open
// All functions that need access to the editor's state live inside
// the CodeMirror function. Below that, at the bottom of the file,
// some utilities are defined.
// CodeMirror is the only global var we claim
- Create a ticketCreate a ticket
Method apply_role
has a Cognitive Complexity of 178 (exceeds 5 allowed). Consider refactoring. Open
def apply_role(role, inst, in_queue, bootstrap = false)
Rails.logger.debug "apply_role(#{role.name}, #{inst}, #{in_queue}, #{bootstrap})"
Rails.logger.progress("Starting to apply role #{role.name}")
# Variables used in the global ensure
- 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
File service_object.rb
has 1352 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "pp"
require "chef"
require "json"
require "hash_only_merge"
require "securerandom"
- Create a ticketCreate a ticket
File node.rb
has 1319 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "chef/mixin/deep_merge"
require "timeout"
require "open3"
class Node < ChefObject
- Create a ticketCreate a ticket
Class Node
has 160 methods (exceeds 20 allowed). Consider refactoring. Open
class Node < ChefObject
include Crowbar::ConduitResolver
self.chef_type = "node"
- Create a ticketCreate a ticket
Function __module11__
has 568 lines of code (exceeds 25 allowed). Consider refactoring. Open
var __module11__ = (function(__dependency1__) {
"use strict";
var __exports__;
var COMPILER_REVISION = __dependency1__.COMPILER_REVISION;
var REVISION_CHANGES = __dependency1__.REVISION_CHANGES;
- Create a ticketCreate a ticket
File barclamp_controller.rb
has 1093 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "chef"
require "json"
class BarclampController < ApplicationController
wrap_parameters false
- Create a ticketCreate a ticket
File upgrade_spec.rb
has 1092 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "spec_helper"
describe Api::Upgrade do
let!(:prechecks) do
JSON.parse(
- Create a ticketCreate a ticket