Showing 1,485 of 3,294 total issues
Consider simplifying this complex logical expression. Open
Open
if ( event.pageX == null && original.clientX != null ) {
eventDoc = event.target.ownerDocument || document;
doc = eventDoc.documentElement;
body = eventDoc.body;
Consider simplifying this complex logical expression. Open
Open
if ( event.pageX == null && original.clientX != null ) {
eventDoc = event.target.ownerDocument || document;
doc = eventDoc.documentElement;
body = eventDoc.body;
Function _cmdInstall
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
Open
function _cmdInstall(packagePath, destinationDirectory, options, callback, pCallback, _doUpdate) {
if (!options || !options.disabledDirectory || !options.apiVersion || !options.systemExtensionDirectory) {
callback(new Error(Errors.MISSING_REQUIRED_OPTIONS), null);
return;
}
- 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
File AutoUpdateDomain.js
has 367 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Copyright (c) 2018 - 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 itself
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var itself = function (s, o, g) {
var a, i, k;
JSHINT.errors = [];
JSHINT.undefs = [];
predefined = Object.create(standard);
Function findSelectorAtDocumentPos
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function findSelectorAtDocumentPos(editor, pos) {
var cm = editor._codeMirror;
var ctx = TokenUtils.getInitialContext(cm, $.extend({}, pos));
var selector = "", foundChars = false;
var isPreprocessorDoc = isCSSPreprocessorFile(editor.document.file.fullPath);
File EditorStatusBar.js
has 363 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"),
Function getParameters
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getParameters(inferFnType) {
// work around define functions before use warning.
var recordTypeToString, inferTypeToString, processInferFnTypeParameters, inferFnTypeToString;
File jquery.ui.spinner.js
has 360 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery UI Spinner @VERSION
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
Function nud
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
x.nud = function () {
var b, f, i, j, p, t;
var props = {}; // All properties, including accessors
function saveProperty(name, token) {
Function diff
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
QUnit.diff = (function() {
function diff( o, n ) {
var i,
ns = {},
os = {};
Function braceExpand
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function braceExpand (pattern, options) {
options = options || this.options
pattern = typeof pattern === "undefined"
? this.pattern : pattern
File DOMNode.js
has 356 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 jquery.ui.button.js
has 354 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery UI Button @VERSION
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
Function _enterState
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
InstallExtensionDialog.prototype._enterState = function (newState) {
var url,
msg,
self = this,
prevState = this._state;
Function init
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function init(domainManager) {
_domainManager = domainManager;
if (!domainManager.hasDomain("staticServer")) {
domainManager.registerDomain("staticServer", {major: 0, minor: 1});
File HTMLSimpleDOM.js
has 353 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"),
Function init
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function init(domainManager) {
if (!domainManager.hasDomain("FindInFiles")) {
domainManager.registerDomain("FindInFiles", {major: 0, minor: 1});
}
_domainManager = domainManager;
Function report
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
itself.report = function (option) {
var data = itself.data();
var a = [], c, e, err, f, i, k, l, m = '', n, o = [], s;
Function CSSAgent
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
define(function CSSAgent(require, exports, module) {
"use strict";
var _ = require("thirdparty/lodash");