Showing 1,485 of 3,294 total issues
Function getRange
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getRange(cm, start) {
var currentLine = start.line,
text = cm.getLine(currentLine) || "",
i = 0,
tagStack = [],
File CodeHintManager.js
has 317 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 ProtocolAdapter.js
has 317 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Copyright (c) 2019 - present Adobe. 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 handleValidationStatus
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function handleValidationStatus(statusObj) {
enableCheckForUpdateEntry(true);
UpdateStatus.cleanUpdateStatus();
if (statusObj.valid) {
Function nud
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
nud: function () {
var v = this.value,
s = scope[v],
f;
Function _doSearch
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _doSearch(queryInfo, candidateFilesPromise, filter) {
searchModel.filter = filter;
var queryResult = searchModel.setQueryInfo(queryInfo);
if (!queryResult) {
Function HighlightAgent
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
Open
define(function HighlightAgent(require, exports, module) {
"use strict";
var DOMAgent = require("LiveDevelopment/Agents/DOMAgent"),
EventDispatcher = require("utils/EventDispatcher"),
- 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 _getUrlList
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
UrlCodeHints.prototype._getUrlList = function (query) {
var directory,
doc,
docDir,
queryDir = "",
Function getHints
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
UrlCodeHints.prototype.getHints = function (key) {
var mode = this.editor.getModeForSelection(),
cursor = this.editor.getCursorPos(),
filter = "",
hints = [],
Function callbacks
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
callbacks = (function () {
// for string, boolean, number and null
function useStrictEquality( b, a ) {
if ( b instanceof a.constructor || a instanceof b.constructor ) {
Function send
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
send: function( headers, complete ) {
// Get a new xhr
var xhr = s.xhr(),
handle,
File strings.js
has 312 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 jsonValue
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function jsonValue() {
function jsonObject() {
var o = {}, t = nexttoken;
advance('{');
Function handleFileClose
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function handleFileClose(commandData) {
var file,
promptOnly,
_forceClose,
_spawnedRequest,
Function HighlightAgent
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
define(function HighlightAgent(require, exports, module) {
"use strict";
var DOMAgent = require("LiveDevelopment/Agents/DOMAgent"),
EventDispatcher = require("utils/EventDispatcher"),
Function convertToArrowFunction
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function convertToArrowFunction() {
var editor = EditorManager.getActiveEditor();
if (!editor) {
return;
}
Function run
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function run() {
if (!_enabled) {
_hasErrors = false;
_currentPromise = null;
Resizer.hide($problemsPanel);
File HTMLUtils.js
has 310 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 _openInterstitialPage
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _openInterstitialPage() {
var browserStarted = false,
retryCount = 0;
// Open the live browser if the connection fails, retry 3 times
Function showUpdateBar
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function showUpdateBar(msgObj) {
var jsonToMustache = generateJsonForMustache(msgObj),
$updateBarElement = $(Mustache.render(UpdateBarHtml, jsonToMustache));
cleanUpdateBar(); //Remove an already existing update bar, if any