Showing 955 of 1,787 total issues
Function _create
has 203 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
// Some browsers only repeat keydown events, not keypress events,
// so we use the suppressKeyPress flag to determine if we've already
// handled the keydown event. #7269
// Unfortunately the code for & in keypress is the same as the up arrow,
Function insertTable
has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring. 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 setDocument
has 200 lines of code (exceeds 25 allowed). Consider refactoring. Open
setDocument = Sizzle.setDocument = function( node ) {
var doc = node ? node.ownerDocument || node : preferredDoc,
parent = doc.defaultView;
// If no document and documentElement is available, return
File media.js
has 498 lines of code (exceeds 250 allowed). Consider refactoring. Open
tinyMCEPopup.requireLangPack();
var oldWidth, oldHeight, ed, url;
if (url = tinyMCEPopup.getParam("media_external_list_url"))
File props.js
has 491 lines of code (exceeds 250 allowed). Consider refactoring. Open
tinyMCEPopup.requireLangPack();
var defaultFonts = "" +
"Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;" +
"Times New Roman, Times, serif=Times New Roman, Times, serif;" +
Function _generateHTML
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
_generateHTML: function(inst) {
var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
Function Selection
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Selection(selection) {
var t = this, invisibleChar = '\uFEFF', range, lastIERng;
function compareRanges(rng1, rng2) {
if (rng1 && rng2) {
Function insertTable
has 162 lines of code (exceeds 25 allowed). Consider refactoring. 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;
Function support
has 159 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.support = (function() {
var support,
all,
a,
Consider simplifying this complex logical expression. Open
else if(target === 'mouse' && ((event && event.pageX) || cache.event.pageX)) {
// Force left top to allow flipping
at = { x: LEFT, y: TOP };
// Use cached event if one isn't available for positioning
Function insertPara
has 157 lines of code (exceeds 25 allowed). Consider refactoring. Open
insertPara : function(e) {
var t = this, ed = t.editor, dom = ed.dom, d = ed.getDoc(), se = ed.settings, s = ed.selection.getSel(), r = s.getRangeAt(0), b = d.body;
var rb, ra, dir, sn, so, en, eo, sb, eb, bn, bef, aft, sc, ec, n, vp = dom.getViewPort(ed.getWin()), y, ch, car;
// If root blocks are forced then use Operas default behavior since it's really good
Method init
has 157 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init() {
// overiddable variables
$this->file_new_name_body = ''; // replace the name body
$this->file_name_body_add = ''; // append to the name body
Function size
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
var effectSize = $.effects.effect.size = function( o, done ) {
// Create element
var original, baseline, factor,
el = $( this ),
Function parseDate
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
parseDate: function (format, value, settings) {
if (format == null || value == null) {
throw "Invalid arguments";
}
Function Callbacks
has 148 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.Callbacks = function( flags ) {
// Convert flags from String-formatted to Object-formatted
// (we check in cache first)
flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
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 );
}
File tag_manager.js
has 409 lines of code (exceeds 250 allowed). Consider refactoring. Open
var TagManager = {
/** A tree-shaped object provided to init() **/
tags: [],
/** A one-dimensional array populated by createTagList() */
Function init
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init() {
var f = document.forms['fullpage'], el = f.elements, e, i, p, doctypes, encodings, mediaTypes, fonts, ed = tinyMCEPopup.editor, dom = tinyMCEPopup.dom, style;
// Setup doctype select box
doctypes = ed.getParam("fullpage_doctypes", defaultDocTypes).split(',');
Function addUnload
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
addUnload : function(f, s) {
var t = this, w = window;
f = {func : f, scope : s || 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 init
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
function init() {
var f = document.forms['fullpage'], el = f.elements, e, i, p, doctypes, encodings, mediaTypes, fonts, ed = tinyMCEPopup.editor, dom = tinyMCEPopup.dom, style;
// Setup doctype select box
doctypes = ed.getParam("fullpage_doctypes", defaultDocTypes).split(',');
- 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"