nemesiscodex/openfonacide

View on GitHub

Showing 970 of 970 total issues

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

        debug: function() {
          if(settings.debug) {
            if(settings.performance) {
              module.performance.log(arguments);
            }
Severity: Major
Found in static/components/api.js and 20 other locations - About 3 hrs to fix
static/components/accordion.js on lines 379..389
static/components/checkbox.js on lines 318..328
static/components/dimmer.js on lines 441..451
static/components/dropdown.js on lines 1529..1539
static/components/form.js on lines 732..742
static/components/modal.js on lines 650..660
static/components/nag.js on lines 267..277
static/components/popup.js on lines 934..944
static/components/progress.js on lines 555..565
static/components/rating.js on lines 242..252
static/components/search.js on lines 708..718
static/components/shape.js on lines 624..634
static/components/sidebar.js on lines 844..854
static/components/site.js on lines 277..287
static/components/state.js on lines 429..439
static/components/sticky.js on lines 616..626
static/components/tab.js on lines 583..593
static/components/transition.js on lines 812..822
static/components/video.js on lines 307..317
static/components/visibility.js on lines 867..877

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

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

        debug: function() {
          if(settings.debug) {
            if(settings.performance) {
              module.performance.log(arguments);
            }
Severity: Major
Found in static/components/state.js and 20 other locations - About 3 hrs to fix
static/components/accordion.js on lines 379..389
static/components/api.js on lines 627..637
static/components/checkbox.js on lines 318..328
static/components/dimmer.js on lines 441..451
static/components/dropdown.js on lines 1529..1539
static/components/form.js on lines 732..742
static/components/modal.js on lines 650..660
static/components/nag.js on lines 267..277
static/components/popup.js on lines 934..944
static/components/progress.js on lines 555..565
static/components/rating.js on lines 242..252
static/components/search.js on lines 708..718
static/components/shape.js on lines 624..634
static/components/sidebar.js on lines 844..854
static/components/site.js on lines 277..287
static/components/sticky.js on lines 616..626
static/components/tab.js on lines 583..593
static/components/transition.js on lines 812..822
static/components/video.js on lines 307..317
static/components/visibility.js on lines 867..877

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

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

        debug: function() {
          if(settings.debug) {
            if(settings.performance) {
              module.performance.log(arguments);
            }
Severity: Major
Found in static/components/transition.js and 20 other locations - About 3 hrs to fix
static/components/accordion.js on lines 379..389
static/components/api.js on lines 627..637
static/components/checkbox.js on lines 318..328
static/components/dimmer.js on lines 441..451
static/components/dropdown.js on lines 1529..1539
static/components/form.js on lines 732..742
static/components/modal.js on lines 650..660
static/components/nag.js on lines 267..277
static/components/popup.js on lines 934..944
static/components/progress.js on lines 555..565
static/components/rating.js on lines 242..252
static/components/search.js on lines 708..718
static/components/shape.js on lines 624..634
static/components/sidebar.js on lines 844..854
static/components/site.js on lines 277..287
static/components/state.js on lines 429..439
static/components/sticky.js on lines 616..626
static/components/tab.js on lines 583..593
static/components/video.js on lines 307..317
static/components/visibility.js on lines 867..877

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

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

    debug: function() {
      if(settings.debug) {
        if(settings.performance) {
          module.performance.log(arguments);
        }
Severity: Major
Found in static/components/site.js and 20 other locations - About 3 hrs to fix
static/components/accordion.js on lines 379..389
static/components/api.js on lines 627..637
static/components/checkbox.js on lines 318..328
static/components/dimmer.js on lines 441..451
static/components/dropdown.js on lines 1529..1539
static/components/form.js on lines 732..742
static/components/modal.js on lines 650..660
static/components/nag.js on lines 267..277
static/components/popup.js on lines 934..944
static/components/progress.js on lines 555..565
static/components/rating.js on lines 242..252
static/components/search.js on lines 708..718
static/components/shape.js on lines 624..634
static/components/sidebar.js on lines 844..854
static/components/state.js on lines 429..439
static/components/sticky.js on lines 616..626
static/components/tab.js on lines 583..593
static/components/transition.js on lines 812..822
static/components/video.js on lines 307..317
static/components/visibility.js on lines 867..877

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

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

        debug: function() {
          if(settings.debug) {
            if(settings.performance) {
              module.performance.log(arguments);
            }
Severity: Major
Found in static/components/dimmer.js and 20 other locations - About 3 hrs to fix
static/components/accordion.js on lines 379..389
static/components/api.js on lines 627..637
static/components/checkbox.js on lines 318..328
static/components/dropdown.js on lines 1529..1539
static/components/form.js on lines 732..742
static/components/modal.js on lines 650..660
static/components/nag.js on lines 267..277
static/components/popup.js on lines 934..944
static/components/progress.js on lines 555..565
static/components/rating.js on lines 242..252
static/components/search.js on lines 708..718
static/components/shape.js on lines 624..634
static/components/sidebar.js on lines 844..854
static/components/site.js on lines 277..287
static/components/state.js on lines 429..439
static/components/sticky.js on lines 616..626
static/components/tab.js on lines 583..593
static/components/transition.js on lines 812..822
static/components/video.js on lines 307..317
static/components/visibility.js on lines 867..877

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

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

        debug: function() {
          if(settings.debug) {
            if(settings.performance) {
              module.performance.log(arguments);
            }
Severity: Major
Found in static/components/form.js and 20 other locations - About 3 hrs to fix
static/components/accordion.js on lines 379..389
static/components/api.js on lines 627..637
static/components/checkbox.js on lines 318..328
static/components/dimmer.js on lines 441..451
static/components/dropdown.js on lines 1529..1539
static/components/modal.js on lines 650..660
static/components/nag.js on lines 267..277
static/components/popup.js on lines 934..944
static/components/progress.js on lines 555..565
static/components/rating.js on lines 242..252
static/components/search.js on lines 708..718
static/components/shape.js on lines 624..634
static/components/sidebar.js on lines 844..854
static/components/site.js on lines 277..287
static/components/state.js on lines 429..439
static/components/sticky.js on lines 616..626
static/components/tab.js on lines 583..593
static/components/transition.js on lines 812..822
static/components/video.js on lines 307..317
static/components/visibility.js on lines 867..877

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

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

        debug: function() {
          if(settings.debug) {
            if(settings.performance) {
              module.performance.log(arguments);
            }
Severity: Major
Found in static/components/video.js and 20 other locations - About 3 hrs to fix
static/components/accordion.js on lines 379..389
static/components/api.js on lines 627..637
static/components/checkbox.js on lines 318..328
static/components/dimmer.js on lines 441..451
static/components/dropdown.js on lines 1529..1539
static/components/form.js on lines 732..742
static/components/modal.js on lines 650..660
static/components/nag.js on lines 267..277
static/components/popup.js on lines 934..944
static/components/progress.js on lines 555..565
static/components/rating.js on lines 242..252
static/components/search.js on lines 708..718
static/components/shape.js on lines 624..634
static/components/sidebar.js on lines 844..854
static/components/site.js on lines 277..287
static/components/state.js on lines 429..439
static/components/sticky.js on lines 616..626
static/components/tab.js on lines 583..593
static/components/transition.js on lines 812..822
static/components/visibility.js on lines 867..877

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

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

        debug: function() {
          if(settings.debug) {
            if(settings.performance) {
              module.performance.log(arguments);
            }
Severity: Major
Found in static/components/rating.js and 20 other locations - About 3 hrs to fix
static/components/accordion.js on lines 379..389
static/components/api.js on lines 627..637
static/components/checkbox.js on lines 318..328
static/components/dimmer.js on lines 441..451
static/components/dropdown.js on lines 1529..1539
static/components/form.js on lines 732..742
static/components/modal.js on lines 650..660
static/components/nag.js on lines 267..277
static/components/popup.js on lines 934..944
static/components/progress.js on lines 555..565
static/components/search.js on lines 708..718
static/components/shape.js on lines 624..634
static/components/sidebar.js on lines 844..854
static/components/site.js on lines 277..287
static/components/state.js on lines 429..439
static/components/sticky.js on lines 616..626
static/components/tab.js on lines 583..593
static/components/transition.js on lines 812..822
static/components/video.js on lines 307..317
static/components/visibility.js on lines 867..877

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

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

        debug: function() {
          if(settings.debug) {
            if(settings.performance) {
              module.performance.log(arguments);
            }
Severity: Major
Found in static/components/dropdown.js and 20 other locations - About 3 hrs to fix
static/components/accordion.js on lines 379..389
static/components/api.js on lines 627..637
static/components/checkbox.js on lines 318..328
static/components/dimmer.js on lines 441..451
static/components/form.js on lines 732..742
static/components/modal.js on lines 650..660
static/components/nag.js on lines 267..277
static/components/popup.js on lines 934..944
static/components/progress.js on lines 555..565
static/components/rating.js on lines 242..252
static/components/search.js on lines 708..718
static/components/shape.js on lines 624..634
static/components/sidebar.js on lines 844..854
static/components/site.js on lines 277..287
static/components/state.js on lines 429..439
static/components/sticky.js on lines 616..626
static/components/tab.js on lines 583..593
static/components/transition.js on lines 812..822
static/components/video.js on lines 307..317
static/components/visibility.js on lines 867..877

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

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

        debug: function() {
          if(settings.debug) {
            if(settings.performance) {
              module.performance.log(arguments);
            }
Severity: Major
Found in static/components/popup.js and 20 other locations - About 3 hrs to fix
static/components/accordion.js on lines 379..389
static/components/api.js on lines 627..637
static/components/checkbox.js on lines 318..328
static/components/dimmer.js on lines 441..451
static/components/dropdown.js on lines 1529..1539
static/components/form.js on lines 732..742
static/components/modal.js on lines 650..660
static/components/nag.js on lines 267..277
static/components/progress.js on lines 555..565
static/components/rating.js on lines 242..252
static/components/search.js on lines 708..718
static/components/shape.js on lines 624..634
static/components/sidebar.js on lines 844..854
static/components/site.js on lines 277..287
static/components/state.js on lines 429..439
static/components/sticky.js on lines 616..626
static/components/tab.js on lines 583..593
static/components/transition.js on lines 812..822
static/components/video.js on lines 307..317
static/components/visibility.js on lines 867..877

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

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

          eventInModule: function(event, callback) {
            callback = $.isFunction(callback)
              ? callback
              : function(){}
            ;
Severity: Major
Found in static/components/dropdown.js and 1 other location - About 3 hrs to fix
static/components/dropdown.js on lines 785..799

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

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

          eventInMenu: function(event, callback) {
            callback = $.isFunction(callback)
              ? callback
              : function(){}
            ;
Severity: Major
Found in static/components/dropdown.js and 1 other location - About 3 hrs to fix
static/components/dropdown.js on lines 770..784

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

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

    escape: function(string) {
      var
        badChars     = /[&<>"'`]/g,
        shouldEscape = /[&<>"'`]/,
        escape       = {
Severity: Major
Found in static/components/popup.js and 1 other location - About 3 hrs to fix
static/components/search.js on lines 944..964

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

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

    escape: function(string) {
      var
        badChars     = /[&<>"'`]/g,
        shouldEscape = /[&<>"'`]/,
        escape       = {
Severity: Major
Found in static/components/search.js and 1 other location - About 3 hrs to fix
static/components/popup.js on lines 1174..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 107.

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 beneficiarios_pedidos has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

def beneficiarios_pedidos(periodo, prioridades, ubicaciones, estados, dncp, ret):
    union = False
    cursor = connection.cursor()

    estado = estados.get('estado')
Severity: Minor
Found in openfonacide/resumen.py - About 3 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function elegibles has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

def elegibles(periodo, prioridades, ubicaciones, estados, dncp, ret):
    query = 'SELECT count(DISTINCT codigo_institucion) FROM ('
    cursor = connection.cursor()
    estado = estados.get('estado')
    documentos = estados.get('informes')
Severity: Minor
Found in openfonacide/resumen.py - About 3 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

              $dimmer
                .transition({
                  animation   : settings.transition + ' in',
                  queue       : false,
                  duration    : module.get.duration(),
Severity: Major
Found in static/components/dimmer.js and 1 other location - About 3 hrs to fix
static/components/dimmer.js on lines 265..279

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

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

              $dimmer
                .transition({
                  animation   : settings.transition + ' out',
                  queue       : false,
                  duration    : module.get.duration(),
Severity: Major
Found in static/components/dimmer.js and 1 other location - About 3 hrs to fix
static/components/dimmer.js on lines 221..235

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

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

function mapa (datos) {



function changeData(data, tipo_abastecimiento){
Severity: Major
Found in static/js/agua.js - About 3 hrs to fix

    Function changeTab has 83 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            changeTab: function(tabPath) {
              var
                pushStateAvailable = (window.history && window.history.pushState),
                shouldIgnoreLoad   = (pushStateAvailable && settings.ignoreFirstLoad && firstLoad),
                remoteContent      = (settings.auto || $.isPlainObject(settings.apiSettings) ),
    Severity: Major
    Found in static/components/tab.js - About 3 hrs to fix
      Severity
      Category
      Status
      Source
      Language