lavkumarv/feature-blog-jekyll

View on GitHub

Showing 12 of 16 total issues

File lunr.min.js has 475 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.7.2
 * Copyright (C) 2016 Oliver Nightingale
 * @license MIT
 */
Severity: Minor
Found in _site/js/lunr.min.js - About 7 hrs to fix

    File lunr.min.js has 475 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.7.2
     * Copyright (C) 2016 Oliver Nightingale
     * @license MIT
     */
    Severity: Minor
    Found in js/lunr.min.js - About 7 hrs to fix

      Function stemmer has 96 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              }, t.stemmer = function() {
                  var t = {
                          ational: "ate",
                          tional: "tion",
                          enci: "ence",
      Severity: Major
      Found in _site/js/lunr.min.js - About 3 hrs to fix

        Function stemmer has 96 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                }, t.stemmer = function() {
                    var t = {
                            ational: "ate",
                            tional: "tion",
                            enci: "ence",
        Severity: Major
        Found in js/lunr.min.js - About 3 hrs to fix

          Function search has 39 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  }, t.Index.prototype.search = function(e) {
                      var n = this.pipeline.run(this.tokenizerFn(e)),
                          i = new t.Vector,
                          r = [],
                          o = this._fields.reduce(function(t, e) {
          Severity: Minor
          Found in _site/js/lunr.min.js - About 1 hr to fix

            Function search has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    }, t.Index.prototype.search = function(e) {
                        var n = this.pipeline.run(this.tokenizerFn(e)),
                            i = new t.Vector,
                            r = [],
                            o = this._fields.reduce(function(t, e) {
            Severity: Minor
            Found in js/lunr.min.js - About 1 hr to fix

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

                              T = function(n) {
                                  var i, r, o, s, a, h, u;
                                  if (n.length < 3) return n;
                                  if (o = n.substr(0, 1), "y" == o && (n = o.toUpperCase() + n.substr(1)), s = p, a = v, s.test(n) ? n = n.replace(s, "$1$2") : a.test(n) && (n = n.replace(a, "$1$2")), s = g, a = m, s.test(n)) {
                                      var T = s.exec(n);
              Severity: Minor
              Found in js/lunr.min.js - About 1 hr to fix

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

                                T = function(n) {
                                    var i, r, o, s, a, h, u;
                                    if (n.length < 3) return n;
                                    if (o = n.substr(0, 1), "y" == o && (n = o.toUpperCase() + n.substr(1)), s = p, a = v, s.test(n) ? n = n.replace(s, "$1$2") : a.test(n) && (n = n.replace(a, "$1$2")), s = g, a = m, s.test(n)) {
                                        var T = s.exec(n);
                Severity: Minor
                Found in _site/js/lunr.min.js - About 1 hr to fix

                  Function add has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          }, t.Index.prototype.add = function(e, n) {
                              var i = {},
                                  r = new t.SortedSet,
                                  o = e[this._ref],
                                  n = void 0 === n ? !0 : n;
                  Severity: Minor
                  Found in _site/js/lunr.min.js - About 1 hr to fix

                    Function add has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            }, t.Index.prototype.add = function(e, n) {
                                var i = {},
                                    r = new t.SortedSet,
                                    o = e[this._ref],
                                    n = void 0 === n ? !0 : n;
                    Severity: Minor
                    Found in js/lunr.min.js - About 1 hr to fix

                      Function hasScrolled has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function hasScrolled() {
                          var st = $(this).scrollTop();
                      
                          // Make sure they scroll more than delta
                          if (Math.abs(lastScrollTop - st) <= delta)
                      Severity: Minor
                      Found in _site/js/custom.js - About 25 mins 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 hasScrolled has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function hasScrolled() {
                          var st = $(this).scrollTop();
                      
                          // Make sure they scroll more than delta
                          if (Math.abs(lastScrollTop - st) <= delta)
                      Severity: Minor
                      Found in js/custom.js - About 25 mins 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