sazze/node-pm

View on GitHub

Showing 297 of 342 total issues

Function tld has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  p.tld = function(v, build) {
    if (this._parts.urn) {
      return v === undefined ? '' : this;
    }
    if (typeof v === 'boolean') {
Severity: Minor
Found in docs/template/static/scripts/URI.js - About 1 hr to fix

    Function analyze has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function analyze(analyzerContext, startIndex) {
                var nodes,
                    lastIndex,
                    container,
                    i,
    Severity: Minor
    Found in docs/scripts/sunlight.js - About 1 hr to fix

      Function parse has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        URI.parse = function(string, parts) {
          var pos, t;
          if (!parts) {
            parts = {};
          }
      Severity: Minor
      Found in docs/scripts/URI.js - About 1 hr to fix

        Function tld has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          p.tld = function(v, build) {
            if (this._parts.urn) {
              return v === undefined ? '' : this;
            }
            if (typeof v === 'boolean') {
        Severity: Minor
        Found in docs/scripts/URI.js - About 1 hr to fix

          Function createBetweenRule has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function createBetweenRule(startIndex, opener, closer, caseInsensitive) {
                  return function(tokens) {
                      var index = startIndex,
                          token,
                          success = false;
          Severity: Minor
          Found in docs/template/static/scripts/sunlight.js - About 1 hr to fix

            Function createBetweenRule has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function createBetweenRule(startIndex, opener, closer, caseInsensitive) {
                    return function(tokens) {
                        var index = startIndex,
                            token,
                            success = false;
            Severity: Minor
            Found in docs/scripts/sunlight.js - About 1 hr to fix

              Function reload has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                reload: function (callback) {
                  if (typeof callback !== 'function') {
                    callback = function () {};
                  }
              
              
              Severity: Minor
              Found in lib/main.js - About 1 hr to fix

                Function parseOptions has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                Open

                function parseOptions(options, callback) {
                  "use strict";
                
                  var _ = require('underscore');
                  var config = require('./config');
                Severity: Minor
                Found in lib/main.js - About 1 hr 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 pt has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function pt(e, t) {
                      var r = t.length > 0,
                          s = e.length > 0,
                          o = function(u, a, f, l, h) {
                          var p, d, v, m = [],
                Severity: Minor
                Found in docs/template/static/scripts/jquery.min.js - About 1 hr to fix

                  Function On has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function On(e, t) {
                      var n, r, i, s, o = e.dataTypes.slice(),
                          u = o[0],
                          a = {},
                          f = 0;
                  Severity: Minor
                  Found in docs/template/static/scripts/jquery.min.js - About 1 hr to fix

                    Function On has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function On(e, t) {
                        var n, r, i, s, o = e.dataTypes.slice(),
                            u = o[0],
                            a = {},
                            f = 0;
                    Severity: Minor
                    Found in docs/scripts/jquery.min.js - About 1 hr to fix

                      Function pt has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function pt(e, t) {
                            var r = t.length > 0,
                                s = e.length > 0,
                                o = function(u, a, f, l, h) {
                                var p, d, v, m = [],
                      Severity: Minor
                      Found in docs/scripts/jquery.min.js - About 1 hr to fix

                        Consider simplifying this complex logical expression.
                        Open

                                if (/\\[bdsw]/i.test(j)) a.push(j);
                                else {
                                  var j = m(j),
                                      d;
                                  c + 2 < i && "-" === f[c + 1] ? (d = m(f[c + 2]), c += 2) : d = j;
                        Severity: Critical
                        Found in docs/template/static/scripts/prettify/prettify.js - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                              if (n.dataTypes[0] === "jsonp" || c || h) return s = n.jsonpCallback = v.isFunction(n.jsonpCallback) ? n.jsonpCallback() : n.jsonpCallback, o = e[s], c ? n.url = f.replace(Dn, "$1" + s) : h ? n.data = a.replace(Dn, "$1" + s) : l && (n.url += (_n.test(f) ? "&" : "?") + n.jsonp + "=" + s), n.converters["script json"] = function() {
                                return u || v.error(s + " was not called"), u[0]
                              }, n.dataTypes[0] = "json", e[s] = function() {
                                u = arguments
                              }, i.always(function() {
                          Severity: Critical
                          Found in docs/template/static/scripts/jquery.min.js - About 1 hr to fix

                            Consider simplifying this complex logical expression.
                            Open

                                    if (!o && !p.noBubble && !v.isWindow(s)) {
                                      g = p.delegateType || y, l = Y.test(g + y) ? s : s.parentNode;
                                      for (c = s; l; l = l.parentNode) m.push([l, g]), c = l;
                                      c === (s.ownerDocument || i) && m.push([c.defaultView || c.parentWindow || e, g])
                                    }
                            Severity: Critical
                            Found in docs/template/static/scripts/jquery.min.js - About 1 hr to fix

                              Consider simplifying this complex logical expression.
                              Open

                                      if (/\\[bdsw]/i.test(j)) a.push(j);
                                      else {
                                        var j = m(j),
                                            d;
                                        c + 2 < i && "-" === f[c + 1] ? (d = m(f[c + 2]), c += 2) : d = j;
                              Severity: Critical
                              Found in docs/scripts/prettify/prettify.js - About 1 hr to fix

                                Consider simplifying this complex logical expression.
                                Open

                                    if (o) {
                                      u = v._data(e, "fxshow") || v._data(e, "fxshow", {}), "hidden" in u && (g = u.hidden), a && (u.hidden = !g), g ? v(e).show() : h.done(function() {
                                        v(e).hide()
                                      }), h.done(function() {
                                        var t;
                                Severity: Critical
                                Found in docs/template/static/scripts/jquery.min.js - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                      if (o) {
                                        u = v._data(e, "fxshow") || v._data(e, "fxshow", {}), "hidden" in u && (g = u.hidden), a && (u.hidden = !g), g ? v(e).show() : h.done(function() {
                                          v(e).hide()
                                        }), h.done(function() {
                                          var t;
                                  Severity: Critical
                                  Found in docs/scripts/jquery.min.js - About 1 hr to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                        if (n.dataTypes[0] === "jsonp" || c || h) return s = n.jsonpCallback = v.isFunction(n.jsonpCallback) ? n.jsonpCallback() : n.jsonpCallback, o = e[s], c ? n.url = f.replace(Dn, "$1" + s) : h ? n.data = a.replace(Dn, "$1" + s) : l && (n.url += (_n.test(f) ? "&" : "?") + n.jsonp + "=" + s), n.converters["script json"] = function() {
                                          return u || v.error(s + " was not called"), u[0]
                                        }, n.dataTypes[0] = "json", e[s] = function() {
                                          u = arguments
                                        }, i.always(function() {
                                    Severity: Critical
                                    Found in docs/scripts/jquery.min.js - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                              if (!o && !p.noBubble && !v.isWindow(s)) {
                                                g = p.delegateType || y, l = Y.test(g + y) ? s : s.parentNode;
                                                for (c = s; l; l = l.parentNode) m.push([l, g]), c = l;
                                                c === (s.ownerDocument || i) && m.push([c.defaultView || c.parentWindow || e, g])
                                              }
                                      Severity: Critical
                                      Found in docs/scripts/jquery.min.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language