Halyul/hexo-theme-mdui

View on GitHub

Showing 125 of 125 total issues

Function 2 has 1023 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{}],2:[function(require,module,exports){
(function (global, factory) {
    if (typeof define === "function" && define.amd) {
        define(['./lg-utils'], factory);
    } else if (typeof exports !== "undefined") {
Severity: Major
Found in source/js/_files/lightgallery.js - About 5 days to fix

    File lightgallery.js has 1167 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**!
     * lightgallery.js | 1.0.1 | December 22nd 2016
     * http://sachinchoolur.github.io/lightgallery.js/
     * Copyright (c) 2016 Sachin N;
     * @license GPLv3
    Severity: Major
    Found in source/js/_files/lightgallery.js - About 3 days to fix

      File barba.js has 1007 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      (function webpackUniversalModuleDefinition(root, factory) {
          if(typeof exports === 'object' && typeof module === 'object')
              module.exports = factory();
          else if(typeof define === 'function' && define.amd)
              define("Barba", [], factory);
      Severity: Major
      Found in source/js/_files/barba.js - About 2 days to fix

        Function 1 has 412 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            1: [function(require, module, exports) {
              (function(global, factory) {
                if (typeof define === "function" && define.amd) {
                  define([], factory);
                } else if (typeof exports !== "undefined") {
        Severity: Major
        Found in source/js/_files/lg-zoom.js - About 2 days to fix

          Similar blocks of code found in 4 locations. Consider refactoring.
          Open

            return (function e(t, n, r) {
              function s(o, u) {
                if (!n[o]) {
                  if (!t[o]) {
                    var a = typeof require == "function" && require;
          Severity: Major
          Found in source/js/_files/lg-autoplay.js and 3 other locations - About 1 day to fix
          source/js/_files/lg-fullscreen.js on lines 27..170
          source/js/_files/lg-zoom.js on lines 27..613
          source/js/_files/lightgallery.js on lines 6..1603

          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 292.

          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

          Similar blocks of code found in 4 locations. Consider refactoring.
          Open

            return (function e(t, n, r) {
              function s(o, u) {
                if (!n[o]) {
                  if (!t[o]) {
                    var a = typeof require == "function" && require;
          Severity: Major
          Found in source/js/_files/lg-zoom.js and 3 other locations - About 1 day to fix
          source/js/_files/lg-autoplay.js on lines 27..261
          source/js/_files/lg-fullscreen.js on lines 27..170
          source/js/_files/lightgallery.js on lines 6..1603

          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 292.

          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

          Similar blocks of code found in 4 locations. Consider refactoring.
          Open

            return (function e(t, n, r) {
              function s(o, u) {
                if (!n[o]) {
                  if (!t[o]) {
                    var a = typeof require == "function" && require;
          Severity: Major
          Found in source/js/_files/lg-fullscreen.js and 3 other locations - About 1 day to fix
          source/js/_files/lg-autoplay.js on lines 27..261
          source/js/_files/lg-zoom.js on lines 27..613
          source/js/_files/lightgallery.js on lines 6..1603

          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 292.

          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

          Similar blocks of code found in 4 locations. Consider refactoring.
          Open

           */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Lightgallery = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
          (function (global, factory) {
              if (typeof define === "function" && define.amd) {
                  define(['exports'], factory);
              } else if (typeof exports !== "undefined") {
          Severity: Major
          Found in source/js/_files/lightgallery.js and 3 other locations - About 1 day to fix
          source/js/_files/lg-autoplay.js on lines 27..261
          source/js/_files/lg-fullscreen.js on lines 27..170
          source/js/_files/lg-zoom.js on lines 27..613

          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 292.

          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

          File es6-promise.js has 528 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*!
           * @overview es6-promise - a tiny implementation of Promises/A+.
           * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
           * @license   Licensed under MIT license
           *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
          Severity: Major
          Found in source/js/_files/es6-promise.js - About 1 day to fix

            File lg-zoom.js has 460 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /**!
             * lg-zoom.js | 1.0.1 | December 22nd 2016
             * http://sachinchoolur.github.io/lg-zoom.js
             * Copyright (c) 2016 Sachin N;
             * @license GPLv3
            Severity: Minor
            Found in source/js/_files/lg-zoom.js - About 7 hrs to fix

              Similar blocks of code found in 4 locations. Consider refactoring.
              Open

              (function(f) {
                if (typeof exports === "object" && typeof module !== "undefined") {
                  module.exports = f()
                } else if (typeof define === "function" && define.amd) {
                  define([], f)
              Severity: Major
              Found in source/js/_files/lg-autoplay.js and 3 other locations - About 6 hrs to fix
              source/js/_files/lg-fullscreen.js on lines 7..171
              source/js/_files/lg-zoom.js on lines 7..614
              source/js/_files/lightgallery.js on lines 6..1604

              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 172.

              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

              Similar blocks of code found in 4 locations. Consider refactoring.
              Open

              (function(f) {
                if (typeof exports === "object" && typeof module !== "undefined") {
                  module.exports = f()
                } else if (typeof define === "function" && define.amd) {
                  define([], f)
              Severity: Major
              Found in source/js/_files/lg-fullscreen.js and 3 other locations - About 6 hrs to fix
              source/js/_files/lg-autoplay.js on lines 7..262
              source/js/_files/lg-zoom.js on lines 7..614
              source/js/_files/lightgallery.js on lines 6..1604

              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 172.

              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

              Similar blocks of code found in 4 locations. Consider refactoring.
              Open

              (function(f) {
                if (typeof exports === "object" && typeof module !== "undefined") {
                  module.exports = f()
                } else if (typeof define === "function" && define.amd) {
                  define([], f)
              Severity: Major
              Found in source/js/_files/lg-zoom.js and 3 other locations - About 6 hrs to fix
              source/js/_files/lg-autoplay.js on lines 7..262
              source/js/_files/lg-fullscreen.js on lines 7..171
              source/js/_files/lightgallery.js on lines 6..1604

              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 172.

              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

              File fetch.js has 447 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              (function (global, factory) {
                typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
                typeof define === 'function' && define.amd ? define(['exports'], factory) :
                (factory((global.WHATWGFetch = {})));
              }(this, (function (exports) { 'use strict';
              Severity: Minor
              Found in source/js/_files/fetch.js - About 6 hrs to fix

                Function 1 has 146 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    1: [function(require, module, exports) {
                      (function(global, factory) {
                        if (typeof define === "function" && define.amd) {
                          define([], factory);
                        } else if (typeof exports !== "undefined") {
                Severity: Major
                Found in source/js/_files/lg-autoplay.js - About 5 hrs to fix

                  Function 1 has 141 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                   */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Lightgallery = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
                  (function (global, factory) {
                      if (typeof define === "function" && define.amd) {
                          define(['exports'], factory);
                      } else if (typeof exports !== "undefined") {
                  Severity: Major
                  Found in source/js/_files/lightgallery.js - About 5 hrs to fix

                    Function init has 139 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            Zoom.prototype.init = function() {
                    
                              var _this = this;
                              var zoomIcons = '<button id="lg-zoom-in" class="mdui-btn mdui-btn-icon mdui-ripple mdui-ripple-white mdui-float-right"><i class="mdui-icon mdui-text-color-white-icon material-icons">&#xe8ff;</i></button><button id="lg-zoom-out" class="mdui-btn mdui-btn-icon mdui-ripple mdui-ripple-white mdui-float-right"><i class="mdui-icon mdui-text-color-white-icon material-icons">&#xe900;</i></button>';
                    
                    
                    Severity: Major
                    Found in source/js/_files/lg-zoom.js - About 5 hrs to fix

                      Function loadContent has 135 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          Plugin.prototype.loadContent = function (index, rec, delay) {
                      
                              var _this = this;
                              var _hasPoster = false;
                              var _img;
                      Severity: Major
                      Found in source/js/_files/lightgallery.js - About 5 hrs to fix

                        Function slide has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            Plugin.prototype.slide = function (index, fromTouch, fromThumb) {
                        
                                var _prevIndex = 0;
                                for (var i = 0; i < this.___slide.length; i++) {
                                    if (_lgUtils2.default.hasClass(this.___slide[i], 'lg-current')) {
                        Severity: Major
                        Found in source/js/_files/lightgallery.js - About 4 hrs to fix

                          File smooth-scroll.js has 351 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /*!
                           * smooth-scroll v15.2.0
                           * Animate scrolling to anchor links
                           * (c) 2019 Chris Ferdinandi
                           * MIT License
                          Severity: Minor
                          Found in source/js/_files/smooth-scroll.js - About 4 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language