Showing 350 of 970 total issues
Function actualizarResumen
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
$scope.actualizarResumen = function(){
$scope.loading = true;
$scope.sin_datos = false;
var resumen = {};
resumen.anios = $scope.anioSelected;
Function loadLiquidFillGauge
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
function loadLiquidFillGauge(elementId, value, config) {
if(config == null) config = liquidFillGaugeDefaultSettings();
var gauge = d3.select("#" + elementId);
var radius = Math.min(parseInt(gauge.style("width")), parseInt(gauge.style("height")))/2;
Function keydown
has 124 lines of code (exceeds 25 allowed). Consider refactoring. Open
keydown: function(event) {
var
$currentlySelected = $item.not(className.filtered).filter('.' + className.selected).eq(0),
$activeItem = $menu.children('.' + className.active).eq(0),
$selectedItem = ($currentlySelected.length > 0)
Function point
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
function point(zr, effectList, shape, zlevel) {
var effect = shape.effect;
var color = effect.color || shape.style.strokeColor || shape.style.color;
var shadowColor = effect.shadowColor || color;
var size = effect.scaleSize;
Function query_prioridad
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def query_prioridad(tipo, rango, ubicacion, estado, documentos, reportadas):
begin_query = ('SELECT DISTINCT codigo_establecimiento FROM (')
union = False
query_estado = ''
- 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
File serializers.py
has 346 lines of code (exceeds 250 allowed). Consider refactoring. Open
from rest_framework import serializers
from openfonacide.models import *
from openfonacide.utils import conversion
Function showInfoPopUp
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
$scope.showInfoPopUp = function (id, idInstitucion) {
// $('#map').css('width', '100%');
$scope.establecimiento = id;
if (!$location.$$search.establecimiento) {
sidebarInicialized = false;
Function do_import
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def do_import(lines_list=None, tipo=None):
header_flag = True
header = list()
reader = csv.reader(lines_list.splitlines())
for row in reader:
- 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 insert
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
insert : kwargs(function (obj, values, axis) {
var data = this._array;
var isObjScalar = false;
if (typeof(obj) === 'number') {
obj = [obj];
Function beneficiarios_pedidos
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def beneficiarios_pedidos(periodo, prioridades, ubicaciones, estados, dncp, ret):
union = False
cursor = connection.cursor()
estado = estados.get('estado')
- 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 elegibles
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def elegibles(periodo, prioridades, ubicaciones, estados, dncp, ret):
query = 'SELECT count(DISTINCT codigo_institucion) FROM ('
cursor = connection.cursor()
estado = estados.get('estado')
documentos = estados.get('informes')
- 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 mapa
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
function mapa (datos) {
function changeData(data, tipo_abastecimiento){
Function changeTab
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
changeTab: function(tabPath) {
var
pushStateAvailable = (window.history && window.history.pushState),
shouldIgnoreLoad = (pushStateAvailable && settings.ignoreFirstLoad && firstLoad),
remoteContent = (settings.auto || $.isPlainObject(settings.apiSettings) ),
Function hide
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
hide: function(callback, $subMenu) {
var
$currentMenu = $subMenu || $menu,
duration = ($subMenu)
? (settings.duration * 0.9)
File models.py
has 297 lines of code (exceeds 250 allowed). Consider refactoring. Open
# encoding: utf-8
"""
OpenFonacide Models
Modelo de datos utilizado en OpenFonacide
"""
Function _navigate
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
CBPGridGallery.prototype._navigate = function( dir ) {
if( this.isAnimating ) return;
if( dir === 'next' && this.current === this.itemsCount - 1 || dir === 'prev' && this.current === 0 ) {
this._closeSlideshow();
return;
Function get
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def get(self, request, *args, **kwargs):
codigo_establecimiento = kwargs.get('codigo_establecimiento')
query = request.GET.get('q')
periodo = request.GET.get('periodo')
offset = request.GET.get('offset')
- 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 filtros
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def filtros(request):
prioridades = request.GET.get('prioridades')
ubicacion = request.GET.get('ubicacion')
reportadas = request.GET.get('reportadas')
- 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 _load
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
_load = function() {
if (!_loaded) {
_loaded = TRUE;
_options();
$('a[rel*="address:"]').address();
Function buildPath
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
buildPath : function (ctx, style) {
var pointList = style.pointList;
var len = pointList.length;
if (len === 0) {
return;