Showing 1,798 of 3,223 total issues
Function prettyDate
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
prettyDate: function(d, is_abbr, p, d2) {
var _date,
_date2,
format,
bc_check,
File image.js
has 350 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
var ImageDialog = {
preInit : function() {
var url;
tinyMCEPopup.requireLangPack();
Function load
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
QUnit.load = function() {
runLoggingCallbacks( "begin", QUnit, {} );
// Initialize the config, saving the execution queue
var banner, filter, i, label, len, main, ol, toolbar, userAgent, val,
File wp-lists.js
has 349 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* global ajaxurl, wpAjax */
(function($) {
var fs = {add:'ajaxAdd',del:'ajaxDel',dim:'ajaxDim',process:'process',recolor:'recolor'}, wpList;
wpList = {
Function buildMarkers
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildMarkers() {
var row = 2,
lpos = 0,
row_depth = 0,
Function _startDrag
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_startDrag : function(id, se, ac) {
var t = this, mu, mm, d = DOM.doc, eb, w = t.windows[id], we = w.element, sp = we.getXY(), p, sz, ph, cp, vp, sx, sy, sex, sey, dx, dy, dw, dh;
// Get positons and sizes
// cp = DOM.getPos(t.editor.getContainer());
Function Sizzle
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Sizzle = function( selector, context, results, seed ) {
results = results || [];
context = context || document;
var origContext = context;
Function moveToBookmark
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
moveToBookmark : function(bookmark) {
var t = this, dom = t.dom, marker1, marker2, rng, rng2, root, startContainer, endContainer, startOffset, endOffset;
function setEndPoint(start) {
var point = bookmark[start ? 'start' : 'end'], i, node, offset, children;
Function positionInterval
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function positionInterval(the_main_element, the_intervals, is_animated, is_minor) {
var last_position = 0,
last_position_major = 0,
//in_view_margin = (config.nav.minor_width/config.nav.multiplier.current)/2,
Function _create
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
var n, i, handle, axis, hname,
that = this,
o = this.options;
Function _create
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
var n, i, handle, axis, hname,
that = this,
o = this.options;
Function brushstart
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function brushstart() {
var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed("extent"), dragRestore = d3_event_dragSuppress(), center, origin = d3.mouse(target), offset;
var w = d3.select(d3_window).on("keydown.brush", keydown).on("keyup.brush", keyup);
if (d3.event.changedTouches) {
w.on("touchmove.brush", brushmove).on("touchend.brush", brushend);
Function normalize
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
normalize : function() {
var self = this, rng, normalized, collapsed, node, sibling;
function normalizeEndPoint(start) {
var container, offset, walker, dom = self.dom, body = dom.getRoot(), node, nonEmptyElementsMap, nodeName;
Function parse
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parse : function(css) {
var styles = {}, matches, name, value, isEncoded, urlConverter = settings.url_converter, urlConverterScope = settings.url_converter_scope || this;
function compress(prefix, suffix) {
var top, right, bottom, left;
Function init
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init : function(s) {
var t = this, pl, sl = tinymce.ScriptLoader, e, el = [], ed;
function createId(elm) {
var id = elm.id;
File Gruntfile.js
has 338 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
module.exports = function( grunt ) {
"use strict";
var
Function removeEventListener
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
Open
removeEventListener: function (types, fn, context) { // ([String, Function, Object]) or (Object[, Object])
if (!this[eventsKey]) {
return this;
}
- 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 go
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
Open
go: function( id, mode ) {
var t = this, ed, wrap_id, txtarea_el,
dom = tinymce.DOM;
id = id || 'content';
- 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 parse
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
service.parse = function(data, merge) {
var anotherEntityAnnotation, anotherId, context, createLanguage, dctype, entities, entity, entityAnnotation, entityAnnotations, graph, id, item, language, languages, textAnnotation, textAnnotationId, textAnnotations, types, _i, _j, _len, _len1, _ref, _ref1, _ref2, _ref3;
if (merge == null) {
merge = false;
}
Function quadtree
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.geom.quadtree = function(points, x1, y1, x2, y2) {
var x = d3_geom_pointX, y = d3_geom_pointY, compat;
if (compat = arguments.length) {
x = d3_geom_quadtreeCompatX;
y = d3_geom_quadtreeCompatY;