pasosdeJesus/sivel2_gen

View on GitHub

Showing 410 of 410 total issues

Avoid too many return statements within this method.
Open

              return
Severity: Major
Found in lib/sivel2_gen/concerns/controllers/actoscolectivos_controller.rb - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                      return
    Severity: Major
    Found in lib/sivel2_gen/concerns/controllers/casos_controller.rb - About 30 mins to fix

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

          if (edad > 0) {
            this.edadTarget.value = edad;
          } else {
            this.edadTarget.value = 0;
          }
      Severity: Minor
      Found in app/javascript/controllers/edad_controller.js and 1 other location - About 30 mins to fix
      app/javascript/controllers/edad_controller.js on lines 92..96

      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

      Avoid too many return statements within this method.
      Open

                  return true
      Severity: Major
      Found in lib/sivel2_gen/concerns/controllers/casos_controller.rb - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                          return
        Severity: Major
        Found in lib/sivel2_gen/concerns/controllers/casos_controller.rb - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                      return mi + ai + " - " + mf + af
          Severity: Major
          Found in lib/sivel2_gen/concerns/controllers/mapadep_controller.rb - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                          return
            Severity: Major
            Found in lib/sivel2_gen/concerns/controllers/actos_controller.rb - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                            return
              Severity: Major
              Found in lib/sivel2_gen/concerns/controllers/actos_controller.rb - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                  return
                Severity: Major
                Found in lib/sivel2_gen/concerns/controllers/casos_controller.rb - About 30 mins to fix

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

                              que3.each do |t|
                                if (t[1] != "") 
                                  gb += sep + i.to_s
                                  qc += t[0] + ", "
                                  sep = ", "
                  Severity: Minor
                  Found in lib/sivel2_gen/concerns/controllers/conteos_controller.rb and 2 other locations - About 30 mins to fix
                  lib/sivel2_gen/concerns/controllers/conteos_controller.rb on lines 1046..1052
                  lib/sivel2_gen/concerns/controllers/graficar_conteo_controller.rb on lines 432..438

                  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

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

                              que3.each do |t|
                                if (t[1] != "") 
                                  gb += sep + i.to_s
                                  qc += t[0] + ", "
                                  sep = ", "
                  lib/sivel2_gen/concerns/controllers/conteos_controller.rb on lines 435..441
                  lib/sivel2_gen/concerns/controllers/conteos_controller.rb on lines 1046..1052

                  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

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

                              que3.each do |t|
                                if (t[1] != "") 
                                  gb += sep + i.to_s
                                  qc += t[0] + ", "
                                  sep = ", "
                  Severity: Minor
                  Found in lib/sivel2_gen/concerns/controllers/conteos_controller.rb and 2 other locations - About 30 mins to fix
                  lib/sivel2_gen/concerns/controllers/conteos_controller.rb on lines 435..441
                  lib/sivel2_gen/concerns/controllers/graficar_conteo_controller.rb on lines 432..438

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

                    module Concerns
                      module Models
                        module VictimacolectivaVinculoestado 
                  
                          extend ActiveSupport::Concern
                  lib/sivel2_gen/concerns/models/contextovictima_victima.rb on lines 3..16
                  lib/sivel2_gen/concerns/models/etnia_victimacolectiva.rb on lines 3..21
                  lib/sivel2_gen/concerns/models/otraorga_victima.rb on lines 2..14
                  lib/sivel2_gen/concerns/models/profesion_victima.rb on lines 2..13
                  lib/sivel2_gen/concerns/models/sectorsocialsec_victima.rb on lines 2..13

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

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

                    module Concerns
                      module Models
                        module OtraorgaVictima 
                  
                          extend ActiveSupport::Concern
                  Severity: Major
                  Found in lib/sivel2_gen/concerns/models/otraorga_victima.rb and 5 other locations - About 25 mins to fix
                  lib/sivel2_gen/concerns/models/contextovictima_victima.rb on lines 3..16
                  lib/sivel2_gen/concerns/models/etnia_victimacolectiva.rb on lines 3..21
                  lib/sivel2_gen/concerns/models/profesion_victima.rb on lines 2..13
                  lib/sivel2_gen/concerns/models/sectorsocialsec_victima.rb on lines 2..13
                  lib/sivel2_gen/concerns/models/victimacolectiva_vinculoestado.rb on lines 3..18

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

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

                    module Concerns
                      module Models
                        module EtniaVictimacolectiva
                  
                          extend ActiveSupport::Concern
                  Severity: Major
                  Found in lib/sivel2_gen/concerns/models/etnia_victimacolectiva.rb and 5 other locations - About 25 mins to fix
                  lib/sivel2_gen/concerns/models/contextovictima_victima.rb on lines 3..16
                  lib/sivel2_gen/concerns/models/otraorga_victima.rb on lines 2..14
                  lib/sivel2_gen/concerns/models/profesion_victima.rb on lines 2..13
                  lib/sivel2_gen/concerns/models/sectorsocialsec_victima.rb on lines 2..13
                  lib/sivel2_gen/concerns/models/victimacolectiva_vinculoestado.rb on lines 3..18

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

                  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 (params[:filtro] && params[:filtro]['fechafin'] && 
                                  params[:filtro]['fechafin'] != "") 
                                @pFechafin = fecha_local_estandar(params[:filtro]['fechafin'])
                              else
                                @pFechafin = Sivel2Gen::Caso.maximum(:fecha).to_s
                  lib/sivel2_gen/concerns/controllers/graficar_conteo_controller.rb on lines 114..119

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

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

                    module Concerns
                      module Models
                        module ContextovictimaVictima 
                  
                          extend ActiveSupport::Concern
                  Severity: Major
                  Found in lib/sivel2_gen/concerns/models/contextovictima_victima.rb and 5 other locations - About 25 mins to fix
                  lib/sivel2_gen/concerns/models/etnia_victimacolectiva.rb on lines 3..21
                  lib/sivel2_gen/concerns/models/otraorga_victima.rb on lines 2..14
                  lib/sivel2_gen/concerns/models/profesion_victima.rb on lines 2..13
                  lib/sivel2_gen/concerns/models/sectorsocialsec_victima.rb on lines 2..13
                  lib/sivel2_gen/concerns/models/victimacolectiva_vinculoestado.rb on lines 3..18

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

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

                    module Concerns
                      module Models
                        module SectorsocialsecVictima 
                  
                          extend ActiveSupport::Concern
                  Severity: Major
                  Found in lib/sivel2_gen/concerns/models/sectorsocialsec_victima.rb and 5 other locations - About 25 mins to fix
                  lib/sivel2_gen/concerns/models/contextovictima_victima.rb on lines 3..16
                  lib/sivel2_gen/concerns/models/etnia_victimacolectiva.rb on lines 3..21
                  lib/sivel2_gen/concerns/models/otraorga_victima.rb on lines 2..14
                  lib/sivel2_gen/concerns/models/profesion_victima.rb on lines 2..13
                  lib/sivel2_gen/concerns/models/victimacolectiva_vinculoestado.rb on lines 3..18

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

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

                    module Concerns
                      module Models
                        module ProfesionVictima 
                          extend ActiveSupport::Concern
                            included do
                  Severity: Major
                  Found in lib/sivel2_gen/concerns/models/profesion_victima.rb and 5 other locations - About 25 mins to fix
                  lib/sivel2_gen/concerns/models/contextovictima_victima.rb on lines 3..16
                  lib/sivel2_gen/concerns/models/etnia_victimacolectiva.rb on lines 3..21
                  lib/sivel2_gen/concerns/models/otraorga_victima.rb on lines 2..14
                  lib/sivel2_gen/concerns/models/sectorsocialsec_victima.rb on lines 2..13
                  lib/sivel2_gen/concerns/models/victimacolectiva_vinculoestado.rb on lines 3..18

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

                  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 (params[:filtro] && params[:filtro]['fechaini'] && 
                                  params[:filtro]['fechaini'] != "") 
                                @pFechaini = fecha_local_estandar(params[:filtro]['fechaini'])
                              else
                                @pFechaini = Sivel2Gen::Caso.minimum(:fecha).to_s
                  lib/sivel2_gen/concerns/controllers/graficar_conteo_controller.rb on lines 121..126

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

                  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