Showing 350 of 970 total issues
Function show
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
show: function(callback, $subMenu) {
var
$currentMenu = $subMenu || $menu,
start = ($subMenu)
? function() {}
Function stick
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
stick: function(scroll) {
var
cachedPosition = scroll || $scroll.scrollTop(),
cache = module.cache,
fits = cache.fits,
Function handleKeyboard
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handleKeyboard: function(event) {
var
// force selector refresh
$result = $module.find(selector.result),
$category = $module.find(selector.category),
Function estado_de_obra
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
Open
def estado_de_obra(request):
if request.method != 'POST':
return JsonResponse({'error': 'Método inválido.'}, status=405)
estado = request.POST.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 _albers
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _albers() {
var radians = Math.PI / 180;
var origin = [0, 0]; //[-98, 38],
var parallels = [29.5, 45.5];
var scale = 1000;
Function query
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
query: function() {
if(module.is.disabled()) {
module.debug('Element is disabled API request aborted');
return;
Function grafica1
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function grafica1( cantidades, nombres, anio, opcion,url) {
// configure for module loader
require.config({
paths: {
Function get_options_bar
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function get_options_bar(titulo, subtitulo, legendData, legendSelected, categoryData, series){
return {
title : {
text: titulo,
subtext: subtitulo,
Function grafica2
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function grafica2( cantidades, nombres, anio, opcion,url) {
// configure for module loader
require.config({
paths: {
Function tipo_requerimiento
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
Open
def tipo_requerimiento(periodo, prioridades, ubicaciones, estados, dncp, ret):
query = ''
cursor = connection.cursor()
union = False
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 normalizar_string
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def normalizar_string(self, cadena):
assert isinstance(cadena, unicode)
normalizada = cadena.upper()
normalizada = normalizada.replace(u'Á', 'A')
Function makeTicksList
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function makeTicksList() {
tickList = [];
// Estimate max exponent and min exponent
var maxDataLog = fixAccurate(mathLog(absMax) / lnBase);
Function bodyCSS
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
bodyCSS: function() {
var
width = $module.outerWidth(),
height = $module.outerHeight(),
direction = module.get.direction(),
Consider simplifying this complex logical expression. Open
Open
if($scope.data.ubicaciones && typeof (obtenerUbicacion) == 'function'){
var ubicaciones = $scope.data.ubicaciones;
$scope.rDepartamentos = ubicaciones
.filter(function(obj){return !!obj[0] && !obj[1] && !obj[2]})
.map(function(obj){return obtenerUbicacion(obj, true, true);});
Function urlData
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
urlData: function(url, urlData) {
var
requiredVariables,
optionalVariables
;
Function obtenerTextoUbicacion
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.obtenerTextoUbicacion = function(selected, excluirPadres, incluirHojaNoRaiz, separador){
if(separador == undefined){
separador = " ➜ ";
}
var seleccion = "";
Function get_series_bar
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function get_series_bar(data){
function get_item_style(color){
return {
normal: {
color: color,
Function create
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.create = function () {
if (window.mapLoaded) {
$scope.inicializar();
$timeout(function () {
angular.element('.mapContainer').html(window.mapElement);
Function create
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
create: function() {
var
html = $module.data(metadata.html) || settings.html,
variation = $module.data(metadata.variation) || settings.variation,
title = $module.data(metadata.title) || settings.title,
Function get_series_doble_pie
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function get_series_doble_pie(innerTitle, innerData, outerTittle, outerData){
return [
{
name: innerTitle,
type: 'pie',