Showing 1,798 of 3,223 total issues
Function send
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
Open
send : function(o) {
var x, t, w = window, c = 0;
function ready() {
if (!o.async || x.readyState == 4 || c++ > 10000) {
- 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 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init : function(ed, url) {
// Register commands
ed.addCommand('mceCite', function() {
ed.windowManager.open({
file : url + '/cite.htm',
Function updateAction
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function updateAction() {
var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0];
if (!AutoValidator.validate(formObj)) {
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
Function render
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render : function(nst) {
var t = this, s = t.settings, id = t.id, sl = tinymce.ScriptLoader;
// Page is not loaded yet, wait for it
if (!Event.domLoaded) {
Function finish
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
finish: function() {
config.current = this;
if ( config.requireExpects && this.expected === null ) {
QUnit.pushFailure( "Expected number of assertions to be defined, but expect() was not called.", this.stack );
} else if ( this.expected !== null && this.expected !== this.assertions.length ) {
Function nud
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
nud: function () {
var v = this.value,
s = scope[v],
f;
Function name
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Resource[name] = function(a1, a2, a3, a4) {
var params = {}, data, success, error;
/* jshint -W086 */ /* (purposefully fall through case statements) */
switch(arguments.length) {
Function remove
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
remove: function(node) {
if (node.N) node.N.P = node.P;
if (node.P) node.P.N = node.N;
node.N = node.P = null;
var parent = node.U, sibling, left = node.L, right = node.R, next, red;
Function jsonValue
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function jsonValue() {
function jsonObject() {
var o = {}, t = nexttoken;
advance("{");
Function create
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 + "...");
Function trigger
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
trigger: function( event, data, elem, onlyHandlers ) {
var handle, ontype, cur,
bubbleType, special, tmp, i,
eventPath = [ elem || document ],
type = core_hasOwn.call( event, "type" ) ? event.type : event,
Function _refresh
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_refresh: function() {
var maxHeight,
options = this.options,
heightStyle = options.heightStyle,
parent = this.element.parent(),
Function _refresh
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_refresh: function() {
var maxHeight,
options = this.options,
heightStyle = options.heightStyle,
parent = this.element.parent(),
Function init
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init : function(ed, url) {
var t = this, s, v, o;
t.editor = ed;
t.url = url;
Function setupFormData
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setupFormData() {
var ce = document.getElementById('container'), f = document.forms[0], s, b, i;
// Setup text fields
Function grabContent
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function grabContent(e) {
var n, or, rng, oldRng, sel = ed.selection, dom = ed.dom, body = ed.getBody(), posY, textContent;
// Check if browser supports direct plaintext access
if (e.clipboardData || dom.doc.dataTransfer) {
Function bind
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
self.bind = function(target, names, callback, scope) {
var id, callbackList, i, name, fakeName, nativeHandler, capture, win = window;
// Native event handler function patches the event and executes the callbacks for the expando
function defaultNativeHandler(evt) {
Function Animation
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Animation( elem, properties, options ) {
var result,
stopped,
index = 0,
length = animationPrefilters.length,
Function _doKeyDown
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_doKeyDown: function(event) {
var onSelect, dateStr, sel,
inst = $.datepicker._getInst(event.target),
handled = true,
isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
Function _doKeyDown
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_doKeyDown: function(event) {
var onSelect, dateStr, sel,
inst = $.datepicker._getInst(event.target),
handled = true,
isRTL = inst.dpDiv.is(".ui-datepicker-rtl");