nemesiscodex/openfonacide

View on GitHub

Showing 970 of 970 total issues

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

            else if(settings.label == 'ratio' && module.total) {
              module.debug('Adding ratio to bar label');
              $progress.text( module.get.text(settings.text.ratio) );
            }
            else if(settings.label == 'percent') {
Severity: Minor
Found in static/components/progress.js and 1 other location - About 35 mins to fix
static/components/progress.js on lines 445..448

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

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

            else if(settings.label == 'percent') {
              module.debug('Adding percentage to bar label');
              $progress.text( module.get.text(settings.text.percent) );
            }
Severity: Minor
Found in static/components/progress.js and 1 other location - About 35 mins to fix
static/components/progress.js on lines 441..448

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

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

        destroy: function() {
          module.verbose('Destroying module');
          module.remove.events();
          $module
            .removeData(moduleNamespace)
Severity: Minor
Found in static/components/checkbox.js and 1 other location - About 35 mins to fix
static/components/transition.js on lines 766..770

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

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

  className : {
    active     : 'active',
    animating  : 'animating',
    dimmable   : 'dimmable',
    dimmed     : 'dimmed',
Severity: Minor
Found in static/components/dimmer.js and 2 other locations - About 35 mins to fix
static/components/popup.js on lines 1158..1167
static/components/search.js on lines 913..922

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

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

  error : {
    source      : 'Cannot search. No source used, and Semantic API module was not included',
    noResults   : 'Your search returned no results',
    logging     : 'Error in debug logging, exiting.',
    noEndpoint  : 'No search endpoint was specified',
Severity: Minor
Found in static/components/search.js and 2 other locations - About 35 mins to fix
static/components/dimmer.js on lines 656..665
static/components/popup.js on lines 1158..1167

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

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(settings.value !== false) {
              module.verbose('Current value set in settings', settings.value);
              module.value = settings.value;
            }
Severity: Minor
Found in static/components/progress.js and 2 other locations - About 35 mins to fix
static/components/progress.js on lines 331..334
static/components/progress.js on lines 339..342

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

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 too many return statements within this function.
Open

              return $.extend({}, $.fn.transition.settings, {
                animation : animation
              });
Severity: Major
Found in static/components/transition.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return $('<input/>');
    Severity: Major
    Found in static/components/form.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                    return $.extend({}, $.fn.transition.settings, {
                      animation  : animation,
                      onComplete : duration
                    });
      Severity: Major
      Found in static/components/transition.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                      return settings.on;
        Severity: Major
        Found in static/components/api.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return $.fn.transition.settings;
          Severity: Major
          Found in static/components/transition.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return JsonResponse({'mensaje': 'Éxito'}, status=200)
            Severity: Major
            Found in openfonacide/views.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  return JsonResponse('Exito!', safe=False, status=200)
              Severity: Major
              Found in openfonacide/views.py - About 30 mins to fix

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

                                for (var j = 0; j < axisSize; j++) {
                                    data[idx] = indexList[j];
                                    idx += stride;
                                }
                Severity: Minor
                Found in static/js/dncp/util/ndarray.js and 2 other locations - About 30 mins to fix
                static/js/dncp/util/ndarray.js on lines 511..514
                static/js/dncp/util/ndarray.js on lines 1119..1122

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

                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

                        mercator.scale = function (x) {
                            if (!arguments.length) {
                                return scale;
                            }
                            scale = +x;
                Severity: Minor
                Found in static/js/dncp/util/projection/mercator.js and 1 other location - About 30 mins to fix
                static/js/dncp/util/projection/albers.js on lines 75..81

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

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

                        migrations.AlterField(
                            model_name='mobiliario',
                            name='codigo_distrito',
                            field=models.CharField(max_length=256, null=True, db_index=True),
                Severity: Major
                Found in openfonacide/migrations/0041_auto_20150507_0500.py and 22 other locations - About 30 mins to fix
                openfonacide/migrations/0008_auto_20141130_2305.py on lines 236..239
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 14..17
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 20..23
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 26..29
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 32..35
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 38..41
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 110..113
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 122..125
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 128..131
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 134..137
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 140..143
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 146..149
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 152..155
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 158..161
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 164..167
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 170..173
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 176..179
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 182..185
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 188..191
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 194..197
                openfonacide/migrations/0044_auto_20150513_0340.py on lines 24..27
                openfonacide/migrations/0056_auto_20150615_0159.py on lines 44..47

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

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

                        migrations.AlterField(
                            model_name='sanitario',
                            name='codigo_institucion',
                            field=models.CharField(max_length=256, null=True, db_index=True),
                Severity: Major
                Found in openfonacide/migrations/0041_auto_20150507_0500.py and 22 other locations - About 30 mins to fix
                openfonacide/migrations/0008_auto_20141130_2305.py on lines 236..239
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 14..17
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 20..23
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 26..29
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 32..35
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 38..41
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 110..113
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 116..119
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 122..125
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 128..131
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 134..137
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 140..143
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 146..149
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 152..155
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 164..167
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 170..173
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 176..179
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 182..185
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 188..191
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 194..197
                openfonacide/migrations/0044_auto_20150513_0340.py on lines 24..27
                openfonacide/migrations/0056_auto_20150615_0159.py on lines 44..47

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

                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

                                    for (var j = 0; j < repeats; j++) {
                                        data[idxRepeated] = source[idx];
                                        idxRepeated += stride;
                                    }
                Severity: Minor
                Found in static/js/dncp/util/ndarray.js and 2 other locations - About 30 mins to fix
                static/js/dncp/util/ndarray.js on lines 1119..1122
                static/js/dncp/util/ndarray.js on lines 1191..1194

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

                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

                        othersAnimating: function() {
                          return ($sidebars.not($module).filter('.' + className.animating).length > 0);
                        },
                Severity: Minor
                Found in static/components/sidebar.js and 1 other location - About 30 mins to fix
                static/components/sidebar.js on lines 421..423

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

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

                        migrations.AlterField(
                            model_name='sanitario',
                            name='codigo_zona',
                            field=models.CharField(max_length=256, null=True, db_index=True),
                Severity: Major
                Found in openfonacide/migrations/0041_auto_20150507_0500.py and 22 other locations - About 30 mins to fix
                openfonacide/migrations/0008_auto_20141130_2305.py on lines 236..239
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 14..17
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 20..23
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 26..29
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 32..35
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 38..41
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 110..113
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 116..119
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 122..125
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 128..131
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 134..137
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 140..143
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 146..149
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 152..155
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 158..161
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 170..173
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 176..179
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 182..185
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 188..191
                openfonacide/migrations/0041_auto_20150507_0500.py on lines 194..197
                openfonacide/migrations/0044_auto_20150513_0340.py on lines 24..27
                openfonacide/migrations/0056_auto_20150615_0159.py on lines 44..47

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

                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