Showing 1,798 of 3,223 total issues
Function moveSelection
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function moveSelection(ed, e) {
var VK = tinymce.VK;
var key = e.keyCode;
function handle(upBool, sourceNode, event) {
Function RangeUtils
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
tinymce.dom.RangeUtils = function(dom) {
var INVISIBLE_CHAR = '\uFEFF';
this.walk = function(rng, callback) {
var startContainer = rng.startContainer,
Function getHTML5
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getHTML5() {
var html5 = mapCache.html5;
if (!html5) {
html5 = mapCache.html5 = unpack({
TileLayer
has 37 functions (exceeds 20 allowed). Consider refactoring. Open
Open
L.TileLayer = L.Class.extend({
includes: L.Mixin.Events,
options: {
minZoom: 0,
Function generateCSS
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function generateCSS() {
var ce = document.getElementById('container'), f = document.forms[0], num = new RegExp('[0-9]+', 'g'), s, t;
ce.style.cssText = "";
Function getHTML5
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getHTML5() {
var html5 = mapCache.html5;
if (!html5) {
html5 = mapCache.html5 = unpack({
Function support
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.support = (function() {
var support, all, a,
input, select, fragment,
opt, eventName, isSupported, i,
Function positionMarkers
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function positionMarkers(is_animated) {
var row = 2,
previous_pos = 0,
pos_offset = -2,
File table.js
has 360 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
tinyMCEPopup.requireLangPack();
var action, orgTableWidth, orgTableHeight, dom = tinyMCEPopup.editor.dom;
function insertTable() {
Function addDoubleTapListener
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
Open
addDoubleTapListener: function (obj, handler, id) {
var last,
doubleTap = false,
delay = 250,
touch,
- 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 tree
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.layout.tree = function() {
var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = null;
function tree(d, i) {
var nodes = hierarchy.call(this, d, i), root0 = nodes[0], root1 = wrapTree(root0);
d3_layout_hierarchyVisitAfter(root1, firstWalk), root1.parent.m = -root1.z;
Function sizeSlides
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function sizeSlides() {
var i = 0,
layout_text_media = ".slider-item .layout-text-media .media .media-container ",
layout_media = ".slider-item .layout-media .media .media-container ",
layout_both = ".slider-item .media .media-container",
Function KeyboardNavigation
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
KeyboardNavigation: function(settings, dom) {
var t = this, root = settings.root, items = settings.items,
enableUpDown = settings.enableUpDown, enableLeftRight = settings.enableLeftRight || !settings.enableUpDown,
excludeFromTabOrder = settings.excludeFromTabOrder,
itemFocussed, itemBlurred, rootKeydown, rootFocussed, focussedId;
Function diff
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
QUnit.diff = (function() {
/*jshint eqeqeq:false, eqnull:true */
function diff( o, n ) {
var i,
ns = {},
Function nud
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
x.nud = function () {
var b, f, i, p, t;
var props = {}; // All properties, including accessors
function saveProperty(name, token) {
Function getBookmark
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getBookmark : function(type, normalized) {
var t = this, dom = t.dom, rng, rng2, id, collapsed, name, element, index, chr = '\uFEFF', styles;
function findIndex(name, element) {
var index = 0;
Function init
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init : function(ed, url) {
var self = this, lookup = {}, i, y, item, name;
function isMediaImg(node) {
return node && node.nodeName === 'IMG' && ed.dom.hasClass(node, 'mceItemMedia');
Function gallery
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
wp.media.gallery = (function() {
var galleries = {};
return {
defaults: {
File jquery.ui.button.js
has 353 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery UI Button 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
Function chord
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.layout.chord = function() {
var chord = {}, chords, groups, matrix, n, padding = 0, sortGroups, sortSubgroups, sortChords;
function relayout() {
var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j;
chords = [];