pasosdeJesus/cor1440_gen

View on GitHub

Showing 234 of 234 total issues

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

  module Concerns
    module Models
      module ActividadtipoFormulario
        extend ActiveSupport::Concern

Severity: Minor
Found in lib/cor1440_gen/concerns/models/actividadtipo_formulario.rb and 2 other locations - About 20 mins to fix
lib/cor1440_gen/concerns/models/actividad_respuestafor.rb on lines 4..19
lib/cor1440_gen/concerns/models/formulario_tipoindicador.rb on lines 4..19

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

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

            when Cor1440Gen::Actividad.human_attribute_name(
              :actividadpf
            ).downcase.gsub(' ', '_')
              actividadpf.inject('') do |memo, r|
                memo +
Severity: Minor
Found in lib/cor1440_gen/concerns/models/actividad.rb and 3 other locations - About 20 mins to fix
lib/cor1440_gen/concerns/models/actividad.rb on lines 404..409
lib/cor1440_gen/concerns/models/actividad.rb on lines 520..525
lib/cor1440_gen/concerns/models/actividad.rb on lines 528..534

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

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

            when Cor1440Gen::Actividad.human_attribute_name(
              :proyectofinanciero
            ).downcase.gsub(' ', '_')

              proyectofinanciero.inject('') do |memo, r|
Severity: Minor
Found in lib/cor1440_gen/concerns/models/actividad.rb and 3 other locations - About 20 mins to fix
lib/cor1440_gen/concerns/models/actividad.rb on lines 404..409
lib/cor1440_gen/concerns/models/actividad.rb on lines 412..417
lib/cor1440_gen/concerns/models/actividad.rb on lines 520..525

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

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

        if d[re.id]
          dm = d[re.id][convM]
          df = d[re.id][convF]
          ds = d[re.id][convS]
Severity: Minor
Found in app/helpers/cor1440_gen/conteos_helper.rb and 1 other location - About 20 mins to fix
app/helpers/cor1440_gen/conteos_helper.rb on lines 85..88

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

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

        if d[re.id]
          dm = d[re.id][convM]
          df = d[re.id][convF]
          ds = d[re.id][convS]
Severity: Minor
Found in app/helpers/cor1440_gen/conteos_helper.rb and 1 other location - About 20 mins to fix
app/helpers/cor1440_gen/conteos_helper.rb on lines 175..178

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

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

            when Cor1440Gen::Actividad.human_attribute_name(
              :actividadareas
            ).downcase.gsub(' ', '_')
              actividadareas.inject('') do |memo, r|
                memo +
Severity: Minor
Found in lib/cor1440_gen/concerns/models/actividad.rb and 3 other locations - About 20 mins to fix
lib/cor1440_gen/concerns/models/actividad.rb on lines 412..417
lib/cor1440_gen/concerns/models/actividad.rb on lines 520..525
lib/cor1440_gen/concerns/models/actividad.rb on lines 528..534

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

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

            when Cor1440Gen::Actividad.human_attribute_name(
              :proyectos
            ).downcase.gsub(' ', '_')
              proyecto.inject('') do |memo, r|
                memo +
Severity: Minor
Found in lib/cor1440_gen/concerns/models/actividad.rb and 3 other locations - About 20 mins to fix
lib/cor1440_gen/concerns/models/actividad.rb on lines 404..409
lib/cor1440_gen/concerns/models/actividad.rb on lines 412..417
lib/cor1440_gen/concerns/models/actividad.rb on lines 528..534

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

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

module Cor1440Gen
  module Admin
    class ActividadtiposController < Msip::Admin::BasicasController
      before_action :set_actividadtipo,
        only: [:show, :edit, :update, :destroy]
Severity: Minor
Found in app/controllers/cor1440_gen/admin/actividadtipos_controller.rb and 3 other locations - About 15 mins to fix
app/controllers/cor1440_gen/admin/financiadores_controller.rb on lines 5..12
app/controllers/cor1440_gen/admin/sectoresapc_controller.rb on lines 5..13
app/controllers/cor1440_gen/admin/tiposmoneda_controller.rb on lines 5..12

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

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

module Cor1440Gen
  module Admin
    class SectoresapcController < Msip::Admin::BasicasController
      before_action :set_sectorapc,
        only: [:show, :edit, :update, :destroy]
Severity: Minor
Found in app/controllers/cor1440_gen/admin/sectoresapc_controller.rb and 3 other locations - About 15 mins to fix
app/controllers/cor1440_gen/admin/actividadtipos_controller.rb on lines 5..12
app/controllers/cor1440_gen/admin/financiadores_controller.rb on lines 5..12
app/controllers/cor1440_gen/admin/tiposmoneda_controller.rb on lines 5..12

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

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 tf != df
          numdif += 1
          resultado << "#{pref} #{convF} #{tf}->#{df}"
          pref = ", "
Severity: Minor
Found in app/helpers/cor1440_gen/conteos_helper.rb and 2 other locations - About 15 mins to fix
app/helpers/cor1440_gen/conteos_helper.rb on lines 190..193
app/helpers/cor1440_gen/conteos_helper.rb on lines 195..198

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

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

module Cor1440Gen
  module Admin
    class FinanciadoresController < Msip::Admin::BasicasController
      before_action :set_financiador,
        only: [:show, :edit, :update, :destroy]
Severity: Minor
Found in app/controllers/cor1440_gen/admin/financiadores_controller.rb and 3 other locations - About 15 mins to fix
app/controllers/cor1440_gen/admin/actividadtipos_controller.rb on lines 5..12
app/controllers/cor1440_gen/admin/sectoresapc_controller.rb on lines 5..13
app/controllers/cor1440_gen/admin/tiposmoneda_controller.rb on lines 5..12

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

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 ts != ds
          numdif += 1
          resultado << "#{pref} #{convS} #{ts}->#{ds}"
          pref = ", "
Severity: Minor
Found in app/helpers/cor1440_gen/conteos_helper.rb and 2 other locations - About 15 mins to fix
app/helpers/cor1440_gen/conteos_helper.rb on lines 185..188
app/helpers/cor1440_gen/conteos_helper.rb on lines 190..193

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

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 tm != dm
          numdif += 1
          resultado << "#{pref} #{convM} #{tm}->#{dm}"
          pref = ", "
Severity: Minor
Found in app/helpers/cor1440_gen/conteos_helper.rb and 2 other locations - About 15 mins to fix
app/helpers/cor1440_gen/conteos_helper.rb on lines 185..188
app/helpers/cor1440_gen/conteos_helper.rb on lines 195..198

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

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

module Cor1440Gen
  module Admin
    class TiposmonedaController < Msip::Admin::BasicasController
      before_action :set_tipomoneda,
        only: [:show, :edit, :update, :destroy]
Severity: Minor
Found in app/controllers/cor1440_gen/admin/tiposmoneda_controller.rb and 3 other locations - About 15 mins to fix
app/controllers/cor1440_gen/admin/actividadtipos_controller.rb on lines 5..12
app/controllers/cor1440_gen/admin/financiadores_controller.rb on lines 5..12
app/controllers/cor1440_gen/admin/sectoresapc_controller.rb on lines 5..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 25.

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