Showing 228 of 380 total issues
Method buscar_rango_edad
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def buscar_rango_edad(edad, modelorango)
if (!modelorango || !defined?(modelorango.constantize) ||
!defined?(!modelorango.constantize.habilitados))
puts "No se pudo usar modelorango"
return -1
- 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 principal=
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def principal=(v)
if self.id && self.caso
if v.to_i == 1
self.caso.update_attribute('ubicacion_id', self.id)
elsif self.caso.ubicacion_id == self.id
- 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 procesa_un_filtrom
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def procesa_un_filtrom(where1, r, ids)
if r[:nomfiltro] == :aniosnac
where1 += (where1 != '' ? ' AND ' : '') +
"(persona.anionac IS NULL OR persona.anionac IN ('" +
ids.sort.join("', '") + "'))"
- 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
Function presentarMapaOsm
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
presentarMapaOsm(usuario_autenticado) {
var usuario_aut_global = usuario_autenticado;
// Borrar clase container y ocultar pie de página
document.querySelector('.navbar').classList.add('navbarosm');
document.querySelector('.card-body').classList.add('cardbodyosm');
- 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 genvic
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def genvic
authorize! :contar, Sivel2Gen::Caso
where1 = '';
@fechaini = '';
- 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_sivel2_gen
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def remplazar_sivel2_gen
@persona = Msip::Persona.find(params[:persona_id].to_i)
@caso = Sivel2Gen::Caso.find(params[:caso_id].to_i)
@caso.current_usuario = current_usuario
@vic_position = params[:vic_position].to_i
- 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 remplazarfamiliar
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def remplazarfamiliar
@caso = Sivel2Gen::Caso.find(params[:caso_id])
@caso.current_usuario = current_usuario
@personados = Msip::Persona.find(params[:persona_id].to_i)
@vic_position = params[:vic_position].to_i
- 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 nuevo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def nuevo
if !params[:caso_id].nil?
@presponsable = CasoPresponsable.new
@presponsable.caso_id = params[:caso_id]
@presponsable.presponsable_id = 35
- 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
Avoid too many return
statements within this method. Open
return
Avoid too many return
statements within this method. Open
return
Avoid too many return
statements within this method. Open
return true
Avoid too many return
statements within this method. Open
return
Avoid too many return
statements within this method. Open
return
Avoid too many return
statements within this method. Open
return
Avoid too many return
statements within this method. Open
return
Avoid too many return
statements within this method. Open
return
Avoid too many return
statements within this method. Open
return
Avoid too many return
statements within this method. Open
return
Avoid too many return
statements within this method. Open
return
Avoid too many return
statements within this method. Open
return mi + ai + " - " + mf + af