Showing 1,798 of 3,223 total issues
Function init
has 284 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init: function(ed) {
var LIST_TABBING = 'TABBING';
var LIST_EMPTY_ITEM = 'EMPTY';
var LIST_ESCAPE = 'ESCAPE';
var LIST_PARAGRAPH = 'PARAGRAPH';
File jquery.ui.dialog.js
has 635 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery UI Dialog 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
File jasmine-jquery.js
has 633 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
Jasmine-jQuery: a set of jQuery helpers for Jasmine tests.
Version 2.1.0
File editor_plugin_src.js
has 632 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
Map
has 75 functions (exceeds 20 allowed). Consider refactoring. Open
Open
L.Map = L.Class.extend({
includes: L.Mixin.Events,
options: {
Function brush
has 277 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.svg.brush = function() {
var event = d3_eventDispatch(brush, "brushstart", "brush", "brushend"), x = null, y = null, xExtent = [ 0, 0 ], yExtent = [ 0, 0 ], xExtentDomain, yExtentDomain, xClamp = true, yClamp = true, resizes = d3_svg_brushResizes[0];
function brush(g) {
g.each(function() {
var g = d3.select(this).style("pointer-events", "all").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)").on("mousedown.brush", brushstart).on("touchstart.brush", brushstart);
Function apply
has 265 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function apply(name, vars, node) {
var formatList = get(name), format = formatList[0], bookmark, rng, i, isCollapsed = selection.isCollapsed();
function setElementFormat(elm, fmt) {
fmt = fmt || format;
Function EventUtils
has 263 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function EventUtils(proxy) {
var self = this, events = {}, count, isFocusBlurBound, hasFocusIn, hasMouseEnterLeave, mouseEnterLeave;
hasMouseEnterLeave = "onmouseenter" in document.documentElement;
hasFocusIn = "onfocusin" in document.documentElement;
File wp-tinymce-schema.js
has 603 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* TinyMCE Schema.js
*
* Duck-punched by WordPress core to support a sane schema superset.
*
Function zoom
has 251 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.behavior.zoom = function() {
var view = {
x: 0,
y: 0,
k: 1
File editor_plugin_src.js
has 582 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
File search.php
has 581 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
sleep( 3 );
// no term passed - just exit early with no response
if (empty($_GET['term'])) exit ;
Function ajax
has 241 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ajax: function( url, options ) {
// If url is an object, simulate pre-1.5 signature
if ( typeof url === "object" ) {
options = url;
File Map.js
has 565 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* L.Map is the central class of the API - it is used to create a map.
*/
L.Map = L.Class.extend({
Function parse
has 238 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
self.parse = function(html, args) {
var parser, rootNode, node, nodes, i, l, fi, fl, list, name, validate,
blockElements, startWhiteSpaceRegExp, invalidChildren = [], isInWhiteSpacePreservedElement,
endWhiteSpaceRegExp, allWhiteSpaceRegExp, isAllWhiteSpaceRegExp, whiteSpaceElements, children, nonEmptyElements, rootBlockName;
Function setDocument
has 230 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setDocument = Sizzle.setDocument = function( node ) {
var doc = node ? node.ownerDocument || node : preferredDoc;
// If no document and documentElement is available, return
if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
File props.js
has 548 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
tinyMCEPopup.requireLangPack();
var defaultFonts = "" +
"Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;" +
"Times New Roman, Times, serif=Times New Roman, Times, serif;" +
File jquery.ui.slider.js
has 547 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery UI Slider 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
Function insertTable
has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring. Open
Open
function insertTable() {
var formObj = document.forms[0];
var inst = tinyMCEPopup.editor, dom = inst.dom;
var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className, caption, frame, rules;
var html = '', capEl, elm;
- 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 imgToObject
has 226 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
imgToObject : function(node, args) {
var self = this, editor = self.editor, video, object, embed, iframe, name, value, data,
source, sources, params, param, typeItem, i, item, mp4Source, replacement,
posterSrc, style, audio;