devcows/hugo-universal-theme

View on GitHub

Showing 69 of 69 total issues

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

function sliders () {
  if ($('.owl-carousel').length) {
    $('.customers').owlCarousel({
      items: ($('.customers').attr('data-items') || 6),
      slideSpeed: ($('.customers').attr('data-slide-speed') || 2000),
Severity: Minor
Found in static/js/front.js - About 1 hr to fix

    Function onAdd has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      overlay.onAdd = function() {
        var el = document.createElement('div');
    
        el.style.borderStyle = "none";
        el.style.borderWidth = "0px";
    Severity: Minor
    Found in static/js/hpneo.gmaps.js - About 1 hr to fix

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

          for (var ev = 0; ev < events_that_doesnt_hide_context_menu.length; ev++) {
            var name = events_that_doesnt_hide_context_menu[ev];
      
            if (name in options) {
              setupListener(this.map, name);
      Severity: Major
      Found in static/js/hpneo.gmaps.js and 1 other location - About 1 hr to fix
      static/js/hpneo.gmaps.js on lines 382..388

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

      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 2 locations. Consider refactoring.
      Open

          for (var ev = 0; ev < events_that_hide_context_menu.length; ev++) {
            var name = events_that_hide_context_menu[ev];
      
            if (name in options) {
              setupListener(this.map, name);
      Severity: Major
      Found in static/js/hpneo.gmaps.js and 1 other location - About 1 hr to fix
      static/js/hpneo.gmaps.js on lines 390..396

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

      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

      Function getElevations has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      GMaps.prototype.getElevations = function(options) {
        options = extend_object({
          locations: [],
          path : false,
          samples : 256
      Severity: Minor
      Found in static/js/hpneo.gmaps.js - About 1 hr to fix

        Function utils has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function utils () {
          /* tooltips */
          $('[data-toggle="tooltip"]').tooltip()
        
          /* click on the box activates the radio */
        Severity: Minor
        Found in static/js/front.js - About 1 hr to fix

          Function drawPolygon has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          GMaps.prototype.drawPolygon = function(options) {
            var useGeoJSON = false;
          
            if(options.hasOwnProperty("useGeoJSON")) {
              useGeoJSON = options.useGeoJSON;
          Severity: Minor
          Found in static/js/hpneo.gmaps.js - About 1 hr to fix

            Function buildContextMenuHTML has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var buildContextMenuHTML = function(control, e) {
                  var html = '',
                      options = window.context_menu[self.el.id][control];
            
                  for (var i in options){
            Severity: Minor
            Found in static/js/hpneo.gmaps.js - About 1 hr to fix

              Function setContextMenu has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  this.setContextMenu = function(options) {
                    window.context_menu[self.el.id][options.control] = {};
              
                    var i,
                        ul = doc.createElement('ul');
              Severity: Minor
              Found in static/js/hpneo.gmaps.js - About 1 hr to fix

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

                  Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {
                      "use strict";
                      if (this == null) {
                          throw new TypeError();
                      }
                Severity: Minor
                Found in static/js/hpneo.gmaps.js - About 1 hr to fix

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

                        children.each(function () {
                          if ($(this).innerHeight() > maxHeight) {
                            maxHeight = $(this).innerHeight()
                          }
                        })
                  Severity: Major
                  Found in static/js/front.js and 1 other location - About 1 hr to fix
                  static/js/front.js on lines 358..362

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

                  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 2 locations. Consider refactoring.
                  Open

                      children.each(function () {
                        if ($(this).height() > maxHeight) {
                          maxHeight = $(this).innerHeight()
                        }
                      })
                  Severity: Major
                  Found in static/js/front.js and 1 other location - About 1 hr to fix
                  static/js/front.js on lines 347..351

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

                  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

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

                  function productDetailGallery (confDetailSwitch) {
                    $('.thumb:first').addClass('active')
                    var timer = setInterval(autoSwitch, confDetailSwitch)
                  
                    $('.thumb').click(function (e) {
                  Severity: Minor
                  Found in static/js/front.js - About 1 hr to fix

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

                    GMaps.prototype.loadFromKML = function(options) {
                      var layer = this.getFromKML(options);
                      layer.setMap(this.map);
                    
                      return layer;
                    Severity: Minor
                    Found in static/js/hpneo.gmaps.js and 1 other location - About 55 mins to fix
                    static/js/hpneo.gmaps.js on lines 1120..1125

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

                    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 2 locations. Consider refactoring.
                    Open

                    GMaps.prototype.loadFromFusionTables = function(options) {
                      var layer = this.getFromFusionTables(options);
                      layer.setMap(this.map);
                    
                      return layer;
                    Severity: Minor
                    Found in static/js/hpneo.gmaps.js and 1 other location - About 55 mins to fix
                    static/js/hpneo.gmaps.js on lines 1150..1155

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

                    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

                    Avoid deeply nested control flow statements.
                    Open

                              if (vertex1.lat() + (latLng.lng() - vertex1.lng()) / (vertex2.lng() - vertex1.lng()) * (vertex2.lat() - vertex1.lat()) < latLng.lat()) {
                                inPoly = !inPoly;
                              }
                    Severity: Major
                    Found in static/js/hpneo.gmaps.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                if (p == 'hue' || p == 'color') {
                                  ruleArg = '0x' + ruleArg.substring(1);
                                }
                      Severity: Major
                      Found in static/js/hpneo.gmaps.js - About 45 mins to fix

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

                                if (e.length > 0 && options.start) {
                                  options.start(e[e.length - 1]);
                                }
                        Severity: Minor
                        Found in static/js/hpneo.gmaps.js and 1 other location - About 45 mins to fix
                        static/js/hpneo.gmaps.js on lines 1409..1411

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

                        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

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

                                if (e.length > 0 && options.start) {
                                  options.start(e[e.length - 1]);
                                }
                        Severity: Minor
                        Found in static/js/hpneo.gmaps.js and 1 other location - About 45 mins to fix
                        static/js/hpneo.gmaps.js on lines 1455..1457

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

                        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

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

                                if (e.length > 0 && options.end) {
                                   options.end(e[e.length - 1]);
                                }
                        Severity: Minor
                        Found in static/js/hpneo.gmaps.js and 1 other location - About 40 mins to fix
                        static/js/hpneo.gmaps.js on lines 1478..1480

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

                        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

                        Severity
                        Category
                        Status
                        Source
                        Language