Showing 1,485 of 3,294 total issues
File HTMLInstrumentation.js
has 405 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Copyright (c) 2014 - present Adobe Systems Incorporated. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Function main
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
Open
define(function main(require, exports, module) {
"use strict";
var DocumentManager = require("document/DocumentManager"),
Commands = require("command/Commands"),
- Read upRead up
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 138 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.effects.effect.size = function( o, done ) {
// Create element
var el = $( this ),
props = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ],
Function _create
has 138 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
var i,
o = this.options,
existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
Function _create
has 137 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
this.element.closest( "form" )
.unbind( "reset.button" )
.bind( "reset.button", formResetHandler );
File HTMLInstrumentation.js
has 395 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Copyright (c) 2013 - present Adobe Systems Incorporated. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
File unittests.js
has 390 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Codefolding unit test files
* @author Patrick Oladimeji
* @date 01/08/2015 18:34
*/
Function parseDate
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parseDate: function (format, value, settings) {
if (format == null || value == null)
throw 'Invalid arguments';
value = (typeof value == 'object' ? value.toString() : value + '');
if (value == '')
File strings.js
has 389 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Copyright (c) 2012 - present Adobe Systems Incorporated. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
File SearchResultsView.js
has 388 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Copyright (c) 2014 - present Adobe Systems Incorporated. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Function GotoAgent
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
define(function GotoAgent(require, exports, module) {
"use strict";
require("utils/Global");
File Resizer.js
has 382 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Copyright (c) 2012 - present Adobe Systems Incorporated. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Function Pane
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Pane(id, $container) {
this._initialize();
// Setup the container and the element we're inserting
var self = this,
File jquery.ui.widget.js
has 381 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery UI Widget @VERSION
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
Function _computeRangesAndScore
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _computeRangesAndScore(matchList, str, lastSegmentStart) {
var matchCounter;
var ranges = [];
var lastMatchIndex = -1;
var lastSegmentScore = 0;
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" ?
Function htmlToCSSProvider
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function htmlToCSSProvider(hostEditor, pos) {
// Only provide a CSS editor when cursor is in HTML content
if (hostEditor.getLanguageForSelection().getId() !== "html") {
return null;
Function _performChanges
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _performChanges() {
// If an extension was removed or updated, prompt the user to quit Brackets.
var hasRemovedExtensions = ExtensionManager.hasExtensionsToRemove(),
hasUpdatedExtensions = ExtensionManager.hasExtensionsToUpdate(),
hasDisabledExtensions = ExtensionManager.hasExtensionsToDisable();
Function Editor
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Editor(document, makeMasterEditor, container, range, options) {
var self = this;
var isReadOnly = (options && options.isReadOnly) || !document.editable;
Function equiv
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
QUnit.equiv = (function() {
// Call the o related callback with the given arguments.
function bindCallbacks( o, callbacks, args ) {
var prop = QUnit.objectType( o );