Showing 1,798 of 3,223 total issues
Function prettyDate
has a Cognitive Complexity of 105 (exceeds 5 allowed). Consider refactoring. Open
prettyDate: function(d, is_abbr, p, d2) {
var _date,
_date2,
format,
bc_check,
- 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 EnterKey
has 398 lines of code (exceeds 25 allowed). Consider refactoring. Open
tinymce.EnterKey = function(editor) {
var dom = editor.dom, selection = editor.selection, settings = editor.settings, undoManager = editor.undoManager, nonEmptyElementsMap = editor.schema.getNonEmptyElements();
function handleEnterKey(evt) {
var rng = selection.getRng(true), tmpRng, editableRoot, container, offset, parentBlock, documentMode, shiftKey,
Function handleEnterKey
has 388 lines of code (exceeds 25 allowed). Consider refactoring. Open
function handleEnterKey(evt) {
var rng = selection.getRng(true), tmpRng, editableRoot, container, offset, parentBlock, documentMode, shiftKey,
newBlock, fragment, containerBlock, parentBlockName, containerBlockName, newBlockName, isAfterLastNodeInContainer;
// Returns true if the block can be split into two blocks or not
Function EditorCommands
has 377 lines of code (exceeds 25 allowed). Consider refactoring. Open
tinymce.EditorCommands = function(editor) {
var dom = editor.dom,
selection = editor.selection,
commands = {state: {}, exec : {}, value : {}},
settings = editor.settings,
File editor_plugin_src.js
has 793 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* editor_plugin_src.js
*
* Copyright 2011, Moxiecode Systems AB
* Released under LGPL License.
Function Heartbeat
has 366 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Heartbeat = function() {
var $document = $(document),
settings = {
// Suspend/resume
suspend: false,
Function generateCSS
has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring. Open
function generateCSS() {
var ce = document.getElementById('container'), f = document.forms[0], num = new RegExp('[0-9]+', 'g'), s, t;
ce.style.cssText = "";
- 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 post.js
has 744 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* global postL10n, ajaxurl, wpAjax, setPostThumbnailL10n, postboxes, pagenow, tinymce, alert, deleteUserSetting, getUserSetting, setUserSetting */
/* global theList:true, theExtraList:true, autosave:true */
var tagBox, commentsBox, editPermalink, makeSlugeditClickable, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail, wptitlehint;
File jquery.ui.resizable.js
has 726 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jQuery UI Resizable 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
Function exports
has 335 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function( grunt ) {
"use strict";
var
Function Selection
has 325 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Selection(selection) {
var self = this, dom = selection.dom, TRUE = true, FALSE = false;
function getPosition(rng, start) {
var checkRng, startIndex = 0, endIndex, inside,
File jquery.ui.draggable.js
has 703 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jQuery UI Draggable 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
Function DragSlider
has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring. Open
VMM.DragSlider = function() {
var drag = {
element: "",
element_move: "",
constraint: "",
- 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 createAPIMap
has 316 lines of code (exceeds 25 allowed). Consider refactoring. Open
createAPIMap: function(m) {
var map_attribution = "",
layer,
map,
map_options,
Function updateStyle
has a Cognitive Complexity of 79 (exceeds 5 allowed). Consider refactoring. Open
updateStyle : function(ty) {
var dom = tinyMCEPopup.dom, b, bStyle, bColor, v, isIE = tinymce.isIE, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value});
if (tinyMCEPopup.editor.settings.inline_styles) {
// Handle align
- 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 tb_show
has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring. Open
function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
try {
if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
jQuery("body","html").css({height: "100%", width: "100%"});
- 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 Schema
has 295 lines of code (exceeds 25 allowed). Consider refactoring. Open
tinymce.html.Schema = function(settings) {
var self = this, elements = {}, children = {}, patternElements = [], validStyles, schemaItems;
var whiteSpaceElementsMap, selfClosingElementsMap, shortEndedElementsMap, boolAttrMap, blockElementsMap, nonEmptyElementsMap, customElementsMap = {};
// Creates an lookup table map object for the specified option or the default value
Function Schema
has 295 lines of code (exceeds 25 allowed). Consider refactoring. Open
tinymce.html.Schema = function(settings) {
var self = this, elements = {}, children = {}, patternElements = [], validStyles, schemaItems;
var whiteSpaceElementsMap, selfClosingElementsMap, shortEndedElementsMap, boolAttrMap, blockElementsMap, nonEmptyElementsMap, customElementsMap = {};
// Creates an lookup table map object for the specified option or the default value
Function handleContentEditableSelection
has 292 lines of code (exceeds 25 allowed). Consider refactoring. Open
function handleContentEditableSelection(ed) {
var dom = ed.dom, selection = ed.selection, invisibleChar, caretContainerId = 'mce_noneditablecaret', invisibleChar = '\uFEFF';
// Returns the content editable state of a node "true/false" or null
function getContentEditable(node) {
File jquery.ui.tabs.js
has 651 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jQuery UI Tabs 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors