Showing 1,485 of 3,294 total issues
Function val
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
val: function( value ) {
var hooks, ret, isFunction,
elem = this[0];
if ( !arguments.length ) {
Function on
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
var origFn, type;
// Types can be a map of types/handlers
if ( typeof types === "object" ) {
Function _openPrefFilesInSplitView
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _openPrefFilesInSplitView(prefsPath, defaultPrefsPath, deferredPromise) {
var currScheme = MainViewManager.getLayoutScheme(),
file = FileSystem.getFileForPath(prefsPath),
defaultPrefsFile = FileSystem.getFileForPath(defaultPrefsPath),
Function open
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
DropdownEventHandler.prototype.open = function () {
var self = this;
/**
* Convert keydown events into hint list navigation actions.
Function processLine
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function processLine(line) {
if (line === "") {
return;
}
Function getDirNamesForDuplicateFiles
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getDirNamesForDuplicateFiles(files) {
// Must have at least two files in list for this to make sense
if (files.length <= 1) {
return [];
}
Function extend
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.extend = jQuery.fn.extend = function() {
var options, name, src, copy, copyIsArray, clone,
target = arguments[0] || {},
i = 1,
length = arguments.length,
Function on
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
var origFn, type;
// Types can be a map of types/handlers
if ( typeof types === "object" ) {
Function hash
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function hash(o) {
if (o === false || o === null || o === undefined) {
return 0;
}
if (typeof o.valueOf === 'function') {
Function updateOrderedMap
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function updateOrderedMap(omap, k, v) {
var map = omap._map;
var list = omap._list;
var i = map.get(k);
var has = i !== undefined;
Function stop
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
stop: function( type, clearQueue, gotoEnd ) {
var stopQueue = function( hooks ) {
var stop = hooks.stop;
delete hooks.stop;
stop( gotoEnd );
Function val
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
val: function( value ) {
var hooks, ret, isFunction,
elem = this[0];
if ( !arguments.length ) {
Function show
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, show: function () {
var $tip
, pos
, actualWidth
, placement
Function syncDocToFoldsCache
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
function syncDocToFoldsCache(cm, from, lineAdded) {
"use strict";
var minFoldSize = prefs.getSetting("minFoldSize") || 2;
var opts = cm.state.foldGutter.options || {};
var rf = opts.rangeFinder || CodeMirror.fold.auto;
- 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 installFromURL
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function installFromURL(url) {
var STATE_DOWNLOADING = 1,
STATE_INSTALLING = 2,
STATE_SUCCEEDED = 3,
STATE_FAILED = 4;
Function _getSelectorName
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _getSelectorName(editor, pos) {
var tagInfo = HTMLUtils.getTagInfo(editor, pos),
selectorName = "",
reason;
Function related
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function related() {
var rel = {
scripts: {},
stylesheets: {}
Function setJumpSelection
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setJumpSelection(start, end, isFunction) {
/**
* helper function to decide if the tokens on the RHS of an assignment
* look like an identifier, or member expr.
Function _getValidBezierParams
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _getValidBezierParams(match) {
var param,
// take ease-in-out as default value in case there are no params yet (or they are invalid)
def = [ ".42", "0", ".58", "1" ],
oldIndex = match.index, // we need to store the old match.index to re-set the index afterwards
Function bridge
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.widget.bridge = function( name, object ) {
var fullName = object.prototype.widgetFullName;
$.fn[ name ] = function( options ) {
var isMethodCall = typeof options === "string",
args = slice.call( arguments, 1 ),