nemesiscodex/openfonacide

View on GitHub

Showing 970 of 970 total issues

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

            zr.animate(newShape.id, 'style')
                .when(
                    duration,
                    {
                        r0 : r0
Severity: Major
Found in static/js/dncp/util/ecAnimation.js and 2 other locations - About 1 hr to fix
static/js/dncp/util/ecAnimation.js on lines 183..191
static/js/dncp/util/ecAnimation.js on lines 450..460

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

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

        if(typeof text.content !== undefined && text.content) {
          text.content = escape(text.content);
          html += '<div class="content">' + text.content + '</div>';
        }
Severity: Major
Found in static/components/popup.js and 1 other location - About 1 hr to fix
static/components/popup.js on lines 1201..1204

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

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

            path.bezierCurveTo(
                (cx - tx1) * 0.70 + tx1,
                (cy - ty1) * 0.70 + ty1,
                (cx - sx0) * 0.70 + sx0, 
                (cy - sy0) * 0.70 + sy0,
Severity: Major
Found in static/js/dncp/util/shape/Ribbon.js and 1 other location - About 1 hr to fix
static/js/dncp/util/shape/Ribbon.js on lines 77..83

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

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

        reset: function() {
          module.debug('Resetting animation to beginning conditions');
          module.remove.animationCallbacks();
          module.restore.conditions();
          module.remove.animating();
Severity: Major
Found in static/components/transition.js and 1 other location - About 1 hr to fix
static/components/visibility.js on lines 672..677

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

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

            path.bezierCurveTo(
                (cx - sx1) * 0.70 + sx1, 
                (cy - sy1) * 0.70 + sy1,
                (cx - tx0) * 0.70 + tx0, 
                (cy - ty0) * 0.70 + ty0,
Severity: Major
Found in static/js/dncp/util/shape/Ribbon.js and 1 other location - About 1 hr to fix
static/js/dncp/util/shape/Ribbon.js on lines 91..97

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

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

        if(typeof text.title !== undefined && text.title) {
          text.title = escape(text.title);
          html += '<div class="header">' + text.title + '</div>';
        }
Severity: Major
Found in static/components/popup.js and 1 other location - About 1 hr to fix
static/components/popup.js on lines 1205..1208

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

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

          calculations: function() {
            module.verbose('Saving all calculations necessary to determine positioning');
            module.save.direction();
            module.save.screenCalculations();
            module.save.elementCalculations();
Severity: Major
Found in static/components/visibility.js and 1 other location - About 1 hr to fix
static/components/transition.js on lines 192..197

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

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 line has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function line(zr, oldShape, newShape, duration, easing) {
        if (!oldShape) {
            oldShape = {
                style : {
                    xStart : newShape.style.xStart,
Severity: Minor
Found in static/js/dncp/util/ecAnimation.js - About 1 hr to fix

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

        sort : kwargs(function (axis, order) {
            if (axis < 0) {
                axis = this._shape.length + axis;
            }
            var compareFunc;
    Severity: Minor
    Found in static/js/dncp/util/ndarray.js - About 1 hr to fix

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

                  $control.agregarUbicacion = function () {
                      var selected = [];
                      if (!$control.selected.departamento) {
                          return;
                      }
      Severity: Minor
      Found in static/js/frontend.directive.js - About 1 hr to fix

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

            CBPGridGallery.prototype._initEvents = function() {
                var self = this;
        
                // open the slideshow when clicking on the main grid items
                this.gridItems.forEach( function( item, idx ) {
        Severity: Minor
        Found in static/js/cbpGridGallery.js - About 1 hr to fix

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

              function parseSrcSize(json, specialArea) {
                  specialArea = specialArea || {};
                  convertorParse.xmin = 360;
                  convertorParse.xmax = -360;
                  convertorParse.ymin = 180;
          Severity: Minor
          Found in static/js/dncp/util/projection/normal.js - About 1 hr to fix

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

                      hide: function(callback) {
                        callback = $.isFunction(callback)
                          ? callback
                          : function(){}
                        ;
            Severity: Minor
            Found in static/components/dimmer.js - About 1 hr to fix

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

                          click: function(event) {
                            module.debug('Search result selected');
                            var
                              $result = $(this),
                              $title  = $result.find(selector.title).eq(0),
              Severity: Minor
              Found in static/components/search.js - About 1 hr to fix

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

                          offstagePosition: function(position) {
                            var
                              boundary  = {
                                top    : $(window).scrollTop(),
                                bottom : $(window).scrollTop() + $(window).height(),
                Severity: Minor
                Found in static/components/popup.js - About 1 hr to fix

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

                            select: function() {
                              var
                                selectValues  = module.get.selectValues()
                              ;
                              module.debug('Dropdown initialized on a select', selectValues);
                  Severity: Minor
                  Found in static/components/dropdown.js - About 1 hr to fix

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

                                  if(runSettings.failure !== undefined) {
                                    module.debug('Legacy failure callback detected', runSettings);
                                    module.error(error.legacyParameters, runSettings.failure);
                                    runSettings.onFailure = runSettings.failure;
                                  }
                    Severity: Major
                    Found in static/components/api.js and 2 other locations - About 1 hr to fix
                    static/components/api.js on lines 488..492
                    static/components/api.js on lines 498..502

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

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

                                  if(runSettings.success !== undefined) {
                                    module.debug('Legacy success callback detected', runSettings);
                                    module.error(error.legacyParameters, runSettings.success);
                                    runSettings.onSuccess = runSettings.success;
                                  }
                    Severity: Major
                    Found in static/components/api.js and 2 other locations - About 1 hr to fix
                    static/components/api.js on lines 493..497
                    static/components/api.js on lines 498..502

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

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

                                  if(runSettings.complete !== undefined) {
                                    module.debug('Legacy complete callback detected', runSettings);
                                    module.error(error.legacyParameters, runSettings.complete);
                                    runSettings.onComplete = runSettings.complete;
                                  }
                    Severity: Major
                    Found in static/components/api.js and 2 other locations - About 1 hr to fix
                    static/components/api.js on lines 488..492
                    static/components/api.js on lines 493..497

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

                    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

                            if dis_id:
                                query_ubicacion += ' AND '
                                query_ubicacion += ' ' + tabla_prioridad + '.codigo_distrito = \'' + dis_id + '\' '
                    Severity: Major
                    Found in openfonacide/resumen.py and 1 other location - About 1 hr to fix
                    openfonacide/resumen.py on lines 431..433

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

                    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