insideout10/wordlift-plugin-js

View on GitHub

Showing 1,798 of 3,223 total issues

Function send has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    send : function(o) {
        var x, t, w = window, c = 0;

        function ready() {
            if (!o.async || x.readyState == 4 || c++ > 10000) {
Severity: Minor
Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 3 hrs to fix

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

        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

    function updateAction() {
        var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0];
    
        if (!AutoValidator.validate(formObj)) {
            tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
    Severity: Major
    Found in app/lib/tinymce/jscripts/tiny_mce/plugins/table/js/cell.js - About 3 hrs to fix

      Function render has 89 lines of code (exceeds 25 allowed). Consider refactoring.
      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) {
      Severity: Major
      Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 3 hrs to fix

        Function finish has 89 lines of code (exceeds 25 allowed). Consider refactoring.
        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 ) {
        Severity: Major
        Found in app/lib/jquery-ui-1.10.3/external/qunit.js - About 3 hrs to fix

          Function nud has 89 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  nud: function () {
                      var v = this.value,
                          s = scope[v],
                          f;
          
          
          Severity: Major
          Found in app/lib/jquery-ui-1.10.3/external/jshint.js - About 3 hrs to fix

            Function name has 88 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    Resource[name] = function(a1, a2, a3, a4) {
                      var params = {}, data, success, error;
            
                      /* jshint -W086 */ /* (purposefully fall through case statements) */
                      switch(arguments.length) {
            Severity: Major
            Found in app/lib/angular/angular-resource.js - About 3 hrs to fix

              Function remove has 87 lines of code (exceeds 25 allowed). Consider refactoring.
              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;
              Severity: Major
              Found in app/lib/d3/d3.js - About 3 hrs to fix

                Function jsonValue has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function jsonValue() {
                
                        function jsonObject() {
                            var o = {}, t = nexttoken;
                            advance("{");
                Severity: Major
                Found in app/lib/jquery-ui-1.10.3/external/jshint.js - About 3 hrs to fix

                  Function create has 86 lines of code (exceeds 25 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 + "...");
                              
                  Severity: Major
                  Found in app/lib/TimelineJS.build/build/js/timeline.js - About 3 hrs to fix

                    Function trigger has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                    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,
                    Severity: Major
                    Found in app/lib/jquery-ui-1.10.3/jquery-1.9.1.js - About 3 hrs to fix

                      Function _refresh has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          _refresh: function() {
                              var maxHeight,
                                  options = this.options,
                                  heightStyle = options.heightStyle,
                                  parent = this.element.parent(),
                      Severity: Major
                      Found in app/lib/jquery-ui-1.10.3/ui/jquery.ui.accordion.js - About 3 hrs to fix

                        Function _refresh has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            _refresh: function() {
                                var maxHeight,
                                    options = this.options,
                                    heightStyle = options.heightStyle,
                                    parent = this.element.parent(),
                        Severity: Major
                        Found in app/lib/jquery-ui-1.10.3/ui/jquery-ui.js - About 3 hrs to fix

                          Function init has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                          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

                            function setupFormData() {
                                var ce = document.getElementById('container'), f = document.forms[0], s, b, i;
                            
                                // Setup text fields
                            
                            Severity: Major
                            Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js - About 3 hrs to fix

                              Function grabContent has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                              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) {
                              Severity: Major
                              Found in app/lib/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin_src.js - About 3 hrs to fix

                                Function bind has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                                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) {
                                Severity: Major
                                Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 3 hrs to fix

                                  Function Animation has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function Animation( elem, properties, options ) {
                                      var result,
                                          stopped,
                                          index = 0,
                                          length = animationPrefilters.length,
                                  Severity: Major
                                  Found in app/lib/jquery-ui-1.10.3/jquery-1.9.1.js - About 3 hrs to fix

                                    Function _doKeyDown has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        _doKeyDown: function(event) {
                                            var onSelect, dateStr, sel,
                                                inst = $.datepicker._getInst(event.target),
                                                handled = true,
                                                isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
                                    Severity: Major
                                    Found in app/lib/jquery-ui-1.10.3/ui/jquery.ui.datepicker.js - About 3 hrs to fix

                                      Function _doKeyDown has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          _doKeyDown: function(event) {
                                              var onSelect, dateStr, sel,
                                                  inst = $.datepicker._getInst(event.target),
                                                  handled = true,
                                                  isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
                                      Severity: Major
                                      Found in app/lib/jquery-ui-1.10.3/ui/jquery-ui.js - About 3 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language