Showing 272 of 272 total issues
Method despliega_abajo_prosidebar
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def despliega_abajo_prosidebar(
opcionmenu, iconomenu = nil, iconoexp = nil, &bloque
)
ia = "".html_safe
if iconomenu
- 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 par_municipio_vereda
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def par_municipio_vereda
if municipio_id && vereda_id
if Msip::Vereda.where(municipio_id: municipio_id,
id: vereda_id).count != 1
errors.add(
- 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 capitaliza_titulo
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def capitaliza_titulo(t)
r = ""
n = t.split(/\s+/)
unless n.empty?
r = n[0].titleize
- 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 which
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def which(cmd)
exts = ENV["PATHEXT"] ? ENV["PATHEXT"].split(";") : [""]
ENV["PATH"].split(File::PATH_SEPARATOR).each do |path|
exts.each do |ext|
exe = File.join(path, "#{cmd}#{ext}")
- 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 vformatonumdoc
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def vformatonumdoc
if tdocumento && tdocumento.formatoregex != "" &&
!(numerodocumento =~ Regexp.new("^#{tdocumento.formatoregex}$"))
menserr = "Número de documento con formato errado."
if tdocumento.ayuda
- 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 ponerTemaUsuarioAjax
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
static async ponerTemaUsuarioAjax(){
var root = window
var ruta = 'temausuario'
var datos = {}
var t = Date.now();
- 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 par_pais_departamento
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def par_pais_departamento
if pais_id && departamento_id
if Msip::Departamento.where(pais_id: pais_id,
id: departamento_id).count != 1
errors.add(
- 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 presenta_base
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.presenta_base(registro, atr)
case atr.to_s
when "actualizacion"
registro.updated_at
when "condensado_de_clave"
- 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 tema_usuario
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def tema_usuario(current_usuario)
t = if !current_usuario || !current_usuario.tema_id
if Msip::Tema.where(id: 1).count == 1
Msip::Tema.find(1)
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 identificacionsd
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def identificacionsd
pid = nil
if params && params[:persona_id] && params[:persona_id] != ""
pid = params[:persona_id].to_i
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 index
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def index
c = nil
if params[:departamento_id]
iddep = params[:departamento_id].to_i > 0 ?
params[:departamento_id].to_i : 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 index
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def index
c = nil
if params[:municipio_id]
idmun = params[:municipio_id].to_i > 0 ?
params[:municipio_id].to_i : 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 validar_conjunto_veredas_biyeccion
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def validar_conjunto_veredas_biyeccion(validaciones)
if Msip::Vereda.all.count != Msip::Ubicacionpre.
where(lugar: nil).where.not(vereda_id: nil).
where(centropoblado_id: nil).count
validaciones << {
- 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 validar_conjunto_municipios_biyeccion
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def validar_conjunto_municipios_biyeccion(validaciones)
if Msip::Municipio.all.count != Msip::Ubicacionpre.
where(lugar: nil).where.not(municipio_id: nil).
where(centropoblado_id: nil).where(vereda_id: nil).count
validaciones << {
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
def mundep
if params[:term]
term = Msip::Ubicacion.connection.quote_string(params[:term])
consNomubi = term.downcase.strip # sin_tildes
consNomubi.gsub!(/ +/, ":* & ")
- 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 a_decimal_localizado
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def a_decimal_localizado
if !self || self == ""
return ""
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 validar_conjunto_centrospoblados_biyeccion
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def validar_conjunto_centrospoblados_biyeccion(validaciones)
if Msip::Centropoblado.all.count != Msip::Ubicacionpre.
where(lugar: nil).where.not(centropoblado_id: nil).
where(vereda_id: nil).count
validaciones << {
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
def nuevo
authorize! :nuevo, Msip::Ubicacion
if !params[:caso_id] || params[:caso_id] == ""
respond_to do |format|
format.html { render(inline: "Falta identificacion del caso") }
- 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 validar_conjunto_departamentos_biyeccion
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def validar_conjunto_departamentos_biyeccion(validaciones)
if Msip::Departamento.all.count != Msip::Ubicacionpre.
where(lugar: nil).where.not(departamento_id: nil).
where(municipio_id: nil).count
validaciones << {
- 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 show_msip
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def show_msip
@registro = clase.constantize.find(params[:id])
if @registro.respond_to?("current_usuario=")
@registro.current_usuario = current_usuario
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"