nemesiscodex/openfonacide

View on GitHub

Showing 970 of 970 total issues

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

          display: function() {
            module.verbose('Removing inline display from element', this);
            $(this).css('display', '');
            if( $(this).attr('style') === '') {
              $(this)
Severity: Major
Found in static/components/accordion.js and 1 other location - About 2 hrs to fix
static/components/accordion.js on lines 340..349

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

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

    function geoJson2Path(json, transform, specialArea) {
        specialArea = specialArea || {};
        convertor.scale = null;
        convertor.offset = null;

Severity: Major
Found in static/js/dncp/util/projection/normal.js - About 2 hrs to fix

    Function set has 61 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        set : function (index, narray) {
            if (typeof(index) == 'number') {
                index = index.toString();
            }
            var strides = calculateDimStrides(this._shape);
    Severity: Major
    Found in static/js/dncp/util/ndarray.js - About 2 hrs to fix

      Function get_series_doble_pie has 61 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function get_series_doble_pie(innerTitle, innerData, outerTittle, outerData){
              return [
                  {
                      name: innerTitle,
                      type: 'pie',
      Severity: Major
      Found in static/js/frontend.ResumenController.js - About 2 hrs to fix

        Function values has 60 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                  values: function (fields) {
                    var
                      $fields = $.isArray(fields)
                        ? module.get.fields(fields)
                        : $field,
        Severity: Major
        Found in static/components/form.js - About 2 hrs to fix

          File wsgi.py has 265 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          #!/usr/bin/python
          import os
          
          virtenv = os.environ['OPENSHIFT_PYTHON_DIR'] + '/virtenv/'
          virtualenv = os.path.join(virtenv, 'bin/activate_this.py')
          Severity: Minor
          Found in wsgi.py - About 2 hrs to fix

            File cbpGridGallery.js has 264 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /**
             * cbpGridGallery.js v1.0.0
             * http://www.codrops.com
             *
             * Licensed under the MIT license.
            Severity: Minor
            Found in static/js/cbpGridGallery.js - About 2 hrs to fix

              File smartLogSteps.js has 264 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /**
               * Echarts, logarithmic axis reform
               *
               * @author sushuang (sushuang@baidu.com),
               *         Ievgenii (@Ievgeny, ievgeny@zoomdata.com)
              Severity: Minor
              Found in static/js/dncp/util/smartLogSteps.js - About 2 hrs to fix

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

                    def test_same_tipo_institucion_true(self):
                        c1 = u"COLEGIO PRIVADO"
                        c2 = u"INSTITUTO PRIVADO"
                        self.assertTrue(same_tipo_institucion(c1, c2))
                        c1 = u"ESCUELA PRIVADA 12321"
                Severity: Major
                Found in openfonacide/tests.py and 1 other location - About 2 hrs to fix
                openfonacide/tests.py on lines 105..111

                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

                    def test_mismo_nivel_educativo_multiple(self):
                        c1 = u"ESCUELA COLEGIO LICEO 1"
                        c2 = u"ESCUELA COLEGIO LICEO 2"
                        self.assertTrue(mismo_nivel_educativo(c1, c2))
                        c1 = u"ESCUELA COLEGIO LICEO SEDE 1"
                Severity: Major
                Found in openfonacide/tests.py and 1 other location - About 2 hrs to fix
                openfonacide/tests.py on lines 128..134

                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

                Function grafica3 has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                   function grafica3( datos, anio, opcion,url) {
                
                
                    changeData1(datos);
                
                
                Severity: Major
                Found in static/js/dncp/chart3.js - About 2 hrs to fix

                  Function grafica4 has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                     function grafica4( datos, anio, opcion,url) {
                  
                  
                      changeData(datos);
                  
                  
                  Severity: Major
                  Found in static/js/dncp/chart4.js - About 2 hrs to fix

                    Function getPath has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                getPath: function (leftTop, scale) {
                                    // scale.x: width  = 10.51 : 64
                                    var pList = [
                                        [
                                            [0,3.5],[7,11.2],[15,11.9],[30,7],[42,0.7],[52,0.7],
                    Severity: Major
                    Found in static/js/dncp/util/mapData/params.js - About 2 hrs to fix

                      Function closeOthers has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              closeOthers: function(index) {
                                var
                                  $activeTitle = (index !== undefined)
                                    ? $title.eq(index)
                                    : $(this).closest(selector.title),
                      Severity: Major
                      Found in static/components/accordion.js - About 2 hrs to fix

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

                                remove: {
                                  active: function() {
                                    $dimmer
                                      .removeClass(className.active)
                                    ;
                        Severity: Major
                        Found in static/components/dimmer.js and 1 other location - About 2 hrs to fix
                        static/components/search.js on lines 345..355

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

                        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

                                remove: {
                                  loading: function() {
                                    $module.removeClass(className.loading);
                                  },
                                  focus: function() {
                        Severity: Major
                        Found in static/components/search.js and 1 other location - About 2 hrs to fix
                        static/components/dimmer.js on lines 404..416

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

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

                                close: function(query) {
                                  var
                                    $activeTitle = (query !== undefined)
                                      ? (typeof query === 'number')
                                        ? $title.eq(query)
                        Severity: Major
                        Found in static/components/accordion.js - About 2 hrs to fix

                          Function open has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  open: function(query) {
                                    var
                                      $activeTitle = (query !== undefined)
                                        ? (typeof query === 'number')
                                          ? $title.eq(query)
                          Severity: Major
                          Found in static/components/accordion.js - About 2 hrs to fix

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

                                    remove: {
                                      error: function() {
                                        module.verbose('Removing error state from element', $context);
                                        $context.removeClass(className.error);
                                      },
                            Severity: Major
                            Found in static/components/api.js and 1 other location - About 2 hrs to fix
                            static/components/api.js on lines 453..462

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

                            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

                                    set: {
                                      error: function() {
                                        module.verbose('Adding error state to element', $context);
                                        $context.addClass(className.error);
                                      },
                            Severity: Major
                            Found in static/components/api.js and 1 other location - About 2 hrs to fix
                            static/components/api.js on lines 464..473

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

                            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