sazze/node-pm

View on GitHub
docs/template/static/scripts/prettify/prettify.js

Summary

Maintainability
F
1 mo
Test Coverage

File prettify.js has 480 lines of code (exceeds 250 allowed). Consider refactoring.
Open

var q = null;
window.PR_SHOULD_USE_CONTINUATION = !0;
(function() {
  function L(a) {
    function m(a) {
Severity: Minor
Found in docs/template/static/scripts/prettify/prettify.js - About 7 hrs to fix

    Function L has 73 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function L(a) {
        function m(a) {
          var f = a.charCodeAt(0);
          if (f !== 92) return f;
          var b = a.charAt(1);
    Severity: Major
    Found in docs/template/static/scripts/prettify/prettify.js - About 2 hrs to fix

      Function E has 55 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function E(a) {
          var m =
          a.g;
          try {
            var e = M(a.h),
      Severity: Major
      Found in docs/template/static/scripts/prettify/prettify.js - About 2 hrs to fix

        Function D has 52 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function D(a, m) {
            function e(a) {
              switch (a.nodeType) {
              case 1:
                if (k.test(a.className)) break;
        Severity: Major
        Found in docs/template/static/scripts/prettify/prettify.js - About 2 hrs to fix

          Function x has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function x(a, m) {
              function e(a) {
                for (var l = a.d, p = [l, "pln"], d = 0, g = a.a.match(y) || [], r = {}, n = 0, z = g.length; n < z; ++n) {
                  var f = g[n],
                      b = r[f],
          Severity: Major
          Found in docs/template/static/scripts/prettify/prettify.js - About 2 hrs to fix

            Function prettyPrint has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              window.prettyPrint = function(a) {
                function m() {
                  for (var e = window.PR_SHOULD_USE_CONTINUATION ? l.now() + 250 : Infinity; p < h.length && l.now() < e; p++) {
                    var n = h[p],
                        k = n.className;
            Severity: Minor
            Found in docs/template/static/scripts/prettify/prettify.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

                Function e has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function e(a) {
                      for (var l = a.d, p = [l, "pln"], d = 0, g = a.a.match(y) || [], r = {}, n = 0, z = g.length; n < z; ++n) {
                        var f = g[n],
                            b = r[f],
                            o = void 0,
                Severity: Minor
                Found in docs/template/static/scripts/prettify/prettify.js - About 1 hr to fix

                  Function m has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function m() {
                        for (var e = window.PR_SHOULD_USE_CONTINUATION ? l.now() + 250 : Infinity; p < h.length && l.now() < e; p++) {
                          var n = h[p],
                              k = n.className;
                          if (k.indexOf("prettyprint") >= 0) {
                  Severity: Minor
                  Found in docs/template/static/scripts/prettify/prettify.js - About 1 hr to fix

                    Function M has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function M(a) {
                        function m(a) {
                          switch (a.nodeType) {
                          case 1:
                            if (e.test(a.className)) break;
                    Severity: Minor
                    Found in docs/template/static/scripts/prettify/prettify.js - About 1 hr to fix

                      Avoid deeply nested control flow statements.
                      Open

                                  for (c = 0; c < t; ++c) if (i = m[c], o = f.match(i[1])) {
                                    b = i[0];
                                    break
                                  }
                      Severity: Major
                      Found in docs/template/static/scripts/prettify/prettify.js - About 45 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                                if (k.indexOf("prettyprint") >= 0) {
                                  var k = k.match(g),
                                      f, b;
                                  if (b = !k) {
                                    b = n;
                        Severity: Major
                        Found in docs/template/static/scripts/prettify/prettify.js - About 40 mins to fix

                          Identical blocks of code found in 2 locations. Consider refactoring.
                          Open

                          (function() {
                            function L(a) {
                              function m(a) {
                                var f = a.charCodeAt(0);
                                if (f !== 92) return f;
                          Severity: Major
                          Found in docs/template/static/scripts/prettify/prettify.js and 1 other location - About 1 mo to fix
                          docs/scripts/prettify/prettify.js on lines 3..496

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 7008.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          There are no issues that match your filters.

                          Category
                          Status