Showing 1,485 of 3,294 total issues
Function data
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
itself.data = function () {
var data = { functions: [], options: option }, fu, globals, implieds = [], f, i, j,
members = [], n, unused = [], v;
if (itself.errors.length) {
Function findClosestCulture
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Globalize.findClosestCulture = function( name ) {
var match;
if ( !name ) {
return this.cultures[ this.cultureSelector ] || this.cultures[ "default" ];
}
Function inspectFile
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function inspectFile(file, providerList) {
var response = new $.Deferred(),
results = [];
providerList = providerList || getProvidersForPath(file.fullPath);
File FileUtils.js
has 286 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 main.js
has 285 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 add
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
add: function( elem, types, handler, data, selector ) {
var elemData, eventHandle, events,
t, tns, type, namespaces, handleObj,
handleObjIn, quick, handlers, special;
Function sidebarList
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function sidebarList($scrollerElement, selectedClassName, leafClassName) {
var $listElement = $scrollerElement.find("ul"),
$selectionMarker,
$selectionExtension,
$sidebar = $("#sidebar"),
Function _beforeHTMLReady
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _beforeHTMLReady() {
// Add the platform (mac, win or linux) to the body tag so we can have platform-specific CSS rules
$("body").addClass("platform-" + brackets.platform);
// Browser-hosted version may also have different CSS (e.g. since '#titlebar' is shown)
Function editFilter
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function editFilter(filter, index) {
var lastFocus = window.document.activeElement;
var templateVars = {
instruction: StringUtils.format(Strings.FILE_FILTER_INSTRUCTIONS, brackets.config.glob_help_url),
File InstallExtensionDialog.js
has 284 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 ViewCommandHandlers.js
has 284 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 formatDate
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
formatDate: function (format, date, settings) {
if (!date)
return '';
var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
Function widget
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.widget = function( name, base, prototype ) {
var fullName, existingConstructor, constructor, basePrototype,
namespace = name.split( "." )[ 0 ];
name = name.split( "." )[ 1 ];
Function _findAllFunctionsInText
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _findAllFunctionsInText(text) {
var AST,
results = {},
functionName,
resultNode,
File main.js
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Copyright (c) 2013 Patrick Oladimeji. 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 EditAgent
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
define(function EditAgent(require, exports, module) {
"use strict";
var Inspector = require("LiveDevelopment/Inspector/Inspector");
var DOMAgent = require("LiveDevelopment/Agents/DOMAgent");
Function createGettersAndSetters
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createGettersAndSetters() {
var editor = EditorManager.getActiveEditor();
if (!editor) {
return;
}
Function EditAgent
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
Open
define(function EditAgent(require, exports, module) {
"use strict";
var Inspector = require("LiveDevelopment/Inspector/Inspector");
var DOMAgent = require("LiveDevelopment/Agents/DOMAgent");
- 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 cookie
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
Open
jQuery.cookie = function (key, value, options) {
// key and value given, set cookie...
if (arguments.length > 1 && (value === null || typeof value !== "object")) {
options = jQuery.extend({}, options);
- 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 inlineProvider
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function inlineProvider(hostEditor, pos) {
var jsonFile, propInfo,
propQueue = [], // priority queue of propNames to try
langId = hostEditor.getLanguageForSelection().getId(),
supportedLangs = {