Showing 1,485 of 3,294 total issues
Function insertCssHint
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
UrlCodeHints.prototype.insertCssHint = function (completion) {
var cursor = this.editor.getCursorPos(),
start = { line: cursor.line, ch: cursor.ch },
end = { line: cursor.line, ch: cursor.ch };
Function exps
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
infix('(', function (left, that) {
if (prevtoken.id !== '}' && prevtoken.id !== ')') {
nobreak(prevtoken, token);
}
nospace();
Function insertHint
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
AttrHints.prototype.insertHint = function (completion) {
var cursor = this.editor.getCursorPos(),
start = {line: -1, ch: -1},
end = {line: -1, ch: -1},
tokenType = this.tagInfo.position.tokenType,
Function _buildListView
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
CodeHintList.prototype._buildListView = function (hintObj) {
var self = this,
match = hintObj.match,
selectInitial = hintObj.selectInitial,
view = { hints: [] },
Function JSDocumentModule
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
define(function JSDocumentModule(require, exports, module) {
"use strict";
var EventDispatcher = require("utils/EventDispatcher"),
Inspector = require("LiveDevelopment/Inspector/Inspector"),
Function _create
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
var panel,
that = this,
options = this.options,
active = options.active;
Function _mouseStart
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseStart: function(event, overrideHandle, noActivation) {
var o = this.options;
this.currentContainer = this;
Function openDroppedFiles
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function openDroppedFiles(paths) {
var errorFiles = [],
ERR_MULTIPLE_ITEMS_WITH_DIR = {};
return Async.doInParallel(paths, function (path, idx) {
Function connect
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
NodeConnection.prototype.connect = function (autoReconnect) {
var self = this;
self._autoReconnect = autoReconnect;
var deferred = $.Deferred();
var attemptCount = 0;
Function superMatcher
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
superMatcher = function( seed, context, xml, results, outermost ) {
var elem, j, matcher,
matchedCount = 0,
i = "0",
unmatched = seed && [],
Function _parseDeclarationList
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _parseDeclarationList(level) {
var j;
declListStartLine = Math.min(line, lineCount - 1);
declListStartChar = stream.start;
Function initWith
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.twipsy.initWith = function (options, Constructor, name) {
var twipsy
, binder
, eventIn
, eventOut
Function LiveCSSDocumentModule
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
Open
define(function LiveCSSDocumentModule(require, exports, module) {
"use strict";
var _ = require("thirdparty/lodash"),
CSSUtils = require("language/CSSUtils"),
- 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 main.js
has 267 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 _getInitialDocFromCurrent
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _getInitialDocFromCurrent() {
var doc = _getCurrentDocument(),
refPath,
i;
Function _getInitialDocFromCurrent
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _getInitialDocFromCurrent() {
var doc = DocumentManager.getCurrentDocument(),
refPath,
i;
Function getHealthData
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getHealthData() {
var result = new $.Deferred(),
oneTimeHealthData = {};
oneTimeHealthData.snapshotTime = Date.now();
Function domManip
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
domManip: function( args, table, callback ) {
var results, first, fragment, parent,
value = args[0],
scripts = [];
Function addMatch
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addMatch(match) {
// Pull off the character index
var c = match.index;
var newPoints = 0;
Function _getTagAttributes
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _getTagAttributes(editor, constPos) {
var pos, ctx, ctxPrev, ctxNext, ctxTemp, tagName, exclusionList = [], shouldReplace;
pos = $.extend({}, constPos);
ctx = TokenUtils.getInitialContext(editor._codeMirror, pos);