insideout10/wordlift-plugin-js

View on GitHub

Showing 1,798 of 3,223 total issues

Function labelled has 102 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    blockstmt("switch", function () {
        var t = nexttoken,
            g = false;
        funct["(breakage)"] += 1;
        advance("(");
Severity: Major
Found in app/lib/jquery-ui-1.10.3/external/jshint.js - About 4 hrs to fix

    Function dsv has 100 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      d3.dsv = function(delimiter, mimeType) {
        var reFormat = new RegExp('["' + delimiter + "\n]"), delimiterCode = delimiter.charCodeAt(0);
        function dsv(url, row, callback) {
          if (arguments.length < 3) callback = row, row = null;
          var xhr = d3_xhr(url, mimeType, row == null ? response : typedResponse(row), callback);
    Severity: Major
    Found in app/lib/d3/d3.js - About 4 hrs to fix

      Function calculateInterval has 100 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              function calculateInterval() {
                  // NEED TO REWRITE ALL OF THIS
                  var _first                                = getDateFractions(data[0].startdate),
                      _last                                = getDateFractions(data[data.length - 1].enddate);
                  
      Severity: Major
      Found in app/lib/TimelineJS.build/build/js/timeline.js - About 4 hrs to fix

        Function validateElms has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
        Open

            validateElms : function(f, e) {
                var nl, i, n, s = this.settings, st = true, va = Validator, v;
        
                nl = this.tags(f, e);
                for (i=0; i<nl.length; i++) {
        Severity: Minor
        Found in app/lib/tinymce/jscripts/tiny_mce/utils/validate.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 buildDates has 97 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                function buildDates() {
                    
                    _dates = [];
                    VMM.fireEvent(global, config.events.messege, "Building Dates");
                    updateSize();
        Severity: Major
        Found in app/lib/TimelineJS.build/build/js/timeline.js - About 3 hrs to fix

          Function defaultPrefilter has 97 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function defaultPrefilter( elem, props, opts ) {
              /*jshint validthis:true */
              var prop, index, length,
                  value, dataShow, toggle,
                  tween, hooks, oldfire,
          Severity: Major
          Found in app/lib/jquery-ui-1.10.3/jquery-1.9.1.js - About 3 hrs to fix

            File charmap.js has 327 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /**
             * charmap.js
             *
             * Copyright 2009, Moxiecode Systems AB
             * Released under LGPL License.
            Severity: Minor
            Found in app/lib/tinymce/jscripts/tiny_mce/themes/advanced/js/charmap.js - About 3 hrs to fix

              Function addValidElements has 95 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      function addValidElements(valid_elements) {
                          var ei, el, ai, al, yl, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder,
                              prefix, outputName, globalAttributes, globalAttributesOrder, transElement, key, childKey, value,
                              elementRuleRegExp = /^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,
                              attrRuleRegExp = /^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,
              Severity: Major
              Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 3 hrs to fix

                Function getRange has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        function getRange() {
                            var ieRange = selection.getRng(), domRange = dom.createRng(), element, collapsed, tmpRange, element2, bookmark, fail;
                
                            // If selection is outside the current document just return an empty range
                            element = ieRange.item ? ieRange.item(0) : ieRange.parentElement();
                Severity: Major
                Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 3 hrs to fix

                  Function addValidElements has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          function addValidElements(valid_elements) {
                              var ei, el, ai, al, yl, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder,
                                  prefix, outputName, globalAttributes, globalAttributesOrder, transElement, key, childKey, value,
                                  elementRuleRegExp = /^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,
                                  attrRuleRegExp = /^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,
                  Severity: Major
                  Found in app/admin_files/wp-tinymce-schema.js - About 3 hrs to fix

                    Function d3_geo_clipCircle has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function d3_geo_clipCircle(radius) {
                        var cr = Math.cos(radius), smallRadius = cr > 0, notHemisphere = abs(cr) > ε, interpolate = d3_geo_circleInterpolate(radius, 6 * d3_radians);
                        return d3_geo_clip(visible, clipLine, interpolate, smallRadius ? [ 0, -radius ] : [ -π, radius - π ]);
                        function visible(λ, φ) {
                          return Math.cos(λ) * Math.cos(φ) > cr;
                    Severity: Major
                    Found in app/lib/d3/d3.js - About 3 hrs to fix

                      Function bindNativeEvents has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          tinymce.Editor.prototype.bindNativeEvents = function() {
                              // 'focus', 'blur', 'dblclick', 'beforedeactivate', submit, reset
                              var self = this, i, settings = self.settings, dom = self.dom, nativeToDispatcherMap;
                      
                              nativeToDispatcherMap = {
                      Severity: Major
                      Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 3 hrs to fix

                        Function _updateStyle has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
                        Open

                            _updateStyle: function () {
                                var stroke = this._stroke,
                                    fill = this._fill,
                                    options = this.options,
                                    container = this._container;
                        Severity: Minor
                        Found in bower_components/leaflet/src/layer/vector/Path.VML.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 htmlParser has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function htmlParser( html, handler ) {
                          var index, chars, match, stack = [], last = html;
                          stack.last = function() { return stack[ stack.length - 1 ]; };
                        
                          while ( html ) {
                        Severity: Major
                        Found in app/lib/angular/angular-sanitize.js - About 3 hrs to fix

                          Function d3_geo_clip has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            function d3_geo_clip(pointVisible, clipLine, interpolate, clipStart) {
                              return function(rotate, listener) {
                                var line = clipLine(listener), rotatedClipStart = rotate.invert(clipStart[0], clipStart[1]);
                                var clip = {
                                  point: point,
                          Severity: Major
                          Found in app/lib/d3/d3.js - About 3 hrs to fix

                            Function normalizeEndPoint has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                        function normalizeEndPoint(start) {
                                            var container, offset, walker, dom = self.dom, body = dom.getRoot(), node, nonEmptyElementsMap, nodeName;
                            
                                            function hasBrBeforeAfter(node, left) {
                                                var walker = new TreeWalker(node, dom.getParent(node.parentNode, dom.isBlock) || body);
                            Severity: Major
                            Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 3 hrs to fix

                              Function setupEvents has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  tinymce.Editor.prototype.setupEvents = function() {
                                      var self = this, settings = self.settings;
                              
                                      // Add events to the editor
                                      each([
                              Severity: Major
                              Found in app/lib/tinymce/jscripts/tiny_mce/tiny_mce_src.js - About 3 hrs to fix

                                Function callbacks has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        callbacks = (function () {
                                
                                            // for string, boolean, number and null
                                            function useStrictEquality( b, a ) {
                                                /*jshint eqeqeq:false */
                                Severity: Major
                                Found in app/lib/jquery-ui-1.10.3/external/qunit.js - About 3 hrs to fix

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

                                                  buildData: function(d) {
                                                      var data_obj    = VMM.Timeline.DataObj.data_template_obj,
                                                          is_valid    = false;
                                                      
                                                      VMM.fireEvent(global, VMM.Timeline.Config.events.messege, "Parsing Google Doc Data");
                                  Severity: Minor
                                  Found in app/lib/TimelineJS.build/build/js/timeline.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 a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      init : function(ed) {
                                          var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode(), fl = tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList');
                                  
                                          tinyMCEPopup.resizeToInnerSize();
                                          this.fillClassList('class_list');
                                  Severity: Minor
                                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language