Showing 241 of 410 total issues
Method lista
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def lista
if params[:tabla]
r = nil
if (params[:tabla] == "departamento" && params[:pais_id].to_i > 0)
r = Msip::Departamento.where(fechadeshabilitacion: nil,
Method embeber_mapacalormuncol_svg
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
depid, depcad, titulo, subtitulo, titulorangos, fuente,
cantidadesmun, opciones = {})
Method graficar_sexo
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def graficar_sexo
series_gen= []
if (@vic_dep.count == 0) || (@vic_categorias.count == 0)
flash.now[:info] = "Uno de los filros se encuentra vacío"
else
- Read upRead up
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
Method sin_identificacion
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def sin_identificacion
if nombres == "N" && apellidos == "N"
caso = Sivel2Gen::Victima.where(persona_id: self.id)[0].caso_id
vics = Sivel2Gen::Victima.where(caso_id: caso)
hv = {}
- Read upRead up
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
Method pestanas_formulariocaso
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def pestanas_formulariocaso
#byebug
if current_usuario && can?(:solocambiaretiquetas, Sivel2Gen::Caso)
[
{ titulo: 'Etiquetas', parcial: 'etiquetas'},
- Read upRead up
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
Method remplazar
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def remplazar
@grupoper = Msip::Grupoper.find(params[:grupoper_id].to_i)
@caso = Sivel2Gen::Caso.find(params[:caso_id].to_i)
@vicol_posicion = params[:vicol_posicion].to_i
@caso.current_usuario = current_usuario
- Read upRead up
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
Method poblacion_por_rango_sexo
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def poblacion_por_rango_sexo(caso_id, anio, mes, dia, modelorango,
rangoedadsexo, totsexo)
Method poblacion_por_sexo_rango
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def poblacion_por_sexo_rango(caso_id, anio, mes, dia, modelorango, rangoedad, totsexo)
Method importar_relato
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.importar_relato(doc, menserror, sintaxis_errores, mensexito, ids_importados,
usuario_id, formato_sexo)
Method edad_de_fechanac_fecha
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def edad_de_fechanac_fecha(anionac, mesnac, dianac,
anio, mes, dia)
Method consulta_final
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def consulta_final(i, que3, tablas3, where3, qc, gb)
Avoid deeply nested control flow statements. Open
for (const opc of elem.options) {
if(opc.value == val){
opc.selected = true;
}
}
Avoid deeply nested control flow statements. Open
for (let i = 0; i < ruta.length; i++) {
if (i === ruta.length - 1) {
actual[ruta[i]] = value;
} else {
if (!actual[ruta[i]]) {
Method presponsables_caso_ids
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def presponsables_caso_ids
r = ''
if self.caso && self.caso.presponsable
r = self.caso.presponsable.inject("") { |memo, pr|
(memo == '' ? '' : memo + '; ') + pr.id.to_s
- Read upRead up
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
Method ajusta_titulos
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def ajusta_titulos(pFini, pFfin, pTviolencia, pEtiqueta1,
pEtiqueta2, pColormax)
Method personas_procesa_segun
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def personas_procesa_segun(que1, tablas1, where1, que3, tablas3, where3)
Method procesa_filtrosm
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def procesa_filtrosm(que1, tablas1, where1, que3,
tablas3, where3)
Method procesa_desagregarpor
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def procesa_desagregarpor(que1, tablas1, where1, que3, tablas3, where3)
Method procesa_desagregarpor_om
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def procesa_desagregarpor_om(que1, tablas1, where1, que3, tablas3, where3)
Method consulta_final
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def consulta_final(i, que3, tablas3, where3, qc, gb)