Showing 214 of 272 total issues
Method item_nav_pestaña_bs
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def item_nav_pestaña_bs(idit, titulo, elegida = false,
clase_boton = "", &bloque)
Function msip_ubicacionpre_expandible_registra
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function msip_ubicacionpre_expandible_registra(iniid, campoubi, root,
fcamdep = null, fcammun = null) {
Method poromision_con2p
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def poromision_con2p(params, p1, p2, s,
valorsp = "")
Method descarga_anexo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def descarga_anexo
if !params[:id].nil?
@anexo = Anexo.find(params[:id].to_i)
ruta = @anexo.adjunto_file_name
if !ruta.nil?
- 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 cambiar_convencion_sexo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def cambiar_convencion_sexo(convencion_final)
unless Msip::Persona::CONVENCIONES_SEXO.keys.include?(convencion_final)
Rails.logger.debug { "Conveción desconocida: #{convecion_final}" }
exit(1)
end
- 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 fechanac
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def fechanac
r = ""
r += anionac.to_s if anionac
r += "-"
r += FormatoFechaHelper::ABMESES[mesnac] if mesnac &&
- 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 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)
Rails.logger.debug("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 barra_navegacion_prosidebar
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def barra_navegacion_prosidebar(opciones, &bloque)
fondo = "".html_safe
if opciones[:imagen_barra_lateral]
fondo = content_tag(
:div, class: "image-wrapper"
- 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 abre_anexo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def abre_anexo
if !params[:id].nil?
@anexo = Anexo.find(params[:id].to_i)
ruta = @anexo.adjunto_file_name
if !ruta.nil?
- 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 genera_asociabasica
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def genera_asociabasica
if ENV["DISABLE_SPRING"].to_i != 1
# http://makandracards.com/makandra/24525-disabling-spring-when-debugging
Rails.logger.debug("Ejecutar con DISABLE_SPRING=1")
return
- 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 mundep
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def mundep
if !params[:term]
respond_to do |format|
format.html { render(inline: "Falta variable term") }
format.json { render(inline: "Falta variable term") }
- 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 index
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def index
if !params[:term]
respond_to do |format|
format.html { render(inline: "Falta variable term") }
format.json { render(inline: "Falta variable term") }
- 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 fecha_ddMyyyy
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def fecha_ddMyyyy(*fields)
fields.each do |f|
define_method("#{f}_ddMyyyy") do
val = read_attribute(f)
unless val
- 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 mejora_nuevo_numerodocumento_sindoc
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def mejora_nuevo_numerodocumento_sindoc(
numdoc, persona_id
)
numerodocumento = numdoc.to_s + rand(100).to_s
#% 2147483647 # Max. INTEGER de PostgreSQL
- 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 nil
Avoid too many return
statements within this method. Open
return Msip::Ubicacionpre.where(w).take.id
Avoid too many return
statements within this method. Open
return nil
Avoid too many return
statements within this method. Open
return nil
Avoid too many return
statements within this method. Open
return nil
Avoid too many return
statements within this method. Open
return Msip::Ubicacionpre.where(w).take.id