Showing 1,798 of 3,223 total issues
Function position
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.position = function( options ) {
if ( !options || !options.of ) {
return _position.apply( this, arguments );
}
Function position
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.position = function( options ) {
if ( !options || !options.of ) {
return _position.apply( this, arguments );
}
Function treemap
has 146 lines of code (exceeds 25 allowed). Consider refactoring. Open
d3.layout.treemap = function() {
var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, mode = "squarify", ratio = .5 * (1 + Math.sqrt(5));
function scale(children, k) {
var i = -1, n = children.length, child, area;
while (++i < n) {
Function initContentBody
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
initContentBody : function() {
var self = this, settings = self.settings, targetElm = DOM.get(self.id), doc = self.getDoc(), html, body, contentCssText;
// Setup iframe body
if ((!isIE || !tinymce.relaxedDomain) && !settings.content_editable) {
Function create
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
create: function(data, uid) {
var _valid = false,
//loading_messege = "<span class='messege'><p>" + VMM.master_config.language.messages.loading + "</p></span>";
loading_messege = VMM.MediaElement.loadingmessage(VMM.master_config.language.messages.loading + "...");
- 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 UndoManager
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Open
tinymce.UndoManager = function(editor) {
var self, index = 0, data = [], beforeBookmark, onAdd, onUndo, onRedo;
function getContent() {
// Remove whitespace before/after and remove pure bogus nodes
File jquery.ui.widget.js
has 403 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jQuery UI Widget 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
Function searchNext
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
searchNext : function(a) {
var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0;
if (tinymce.isIE11 && !window.find) {
ed.windowManager.alert("This feature is not available in IE 11+. Upgrade TinyMCE to 4.x to get this functionallity back.");
- 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 Writer
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
tinymce.html.Writer = function(settings) {
var html = [], indent, indentBefore, indentAfter, encode, htmlOutput;
settings = settings || {};
indent = settings.indent;
- 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
File media.js
has 397 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function() {
var url;
if (url = tinyMCEPopup.getParam("media_external_list_url"))
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
File advlink.js
has 396 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Functions for the advlink plugin popup */
tinyMCEPopup.requireLangPack();
var templates = {
Function doOption
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
function doOption() {
var nt = nexttoken;
var o = nt.value;
var quotmarkValue = option.quotmark;
var predef = {};
Function thumbnail
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
thumbnail: function(data, w, h, uid) {
var _w = 16,
_h = 24,
_uid = "";
- 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 _create
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
this.element.closest( "form" )
.unbind( "reset" + this.eventNamespace )
.bind( "reset" + this.eventNamespace, formResetHandler );
Function string
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
function string(x) {
var c, j, r = "", allowNewLine = false;
if (jsonmode && x !== "\"") {
warningAt("Strings must use doublequote.",
Function _create
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
this.element.closest( "form" )
.unbind( "reset" + this.eventNamespace )
.bind( "reset" + this.eventNamespace, formResetHandler );
Function remove
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
function remove(name, vars, node) {
var formatList = get(name), format = formatList[0], bookmark, i, rng, contentEditable = true;
// Merges the styles for each node
function process(node) {
Function d3_geo_clipExtent
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
function d3_geo_clipExtent(x0, y0, x1, y1) {
return function(listener) {
var listener_ = listener, bufferListener = d3_geo_clipBufferListener(), clipLine = d3_geom_clipLine(x0, y0, x1, y1), segments, polygon, ring;
var clip = {
point: point,
Function MediaType
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
VMM.MediaType = function(_d) {
var d = _d.replace(/^\s\s*/, '').replace(/\s\s*$/, ''),
success = false,
media = {
type: "unknown",
Function _dataToHtml
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
_dataToHtml : function(data) {
var headerFragment, headElement, html, elm, value, dom = this.editor.dom;
function setAttr(elm, name, value) {
elm.attr(name, value ? value : undefined);