Showing 117 of 377 total issues
File d3.js
has 3935 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
(function(){if (!Date.now) Date.now = function() {
return +new Date;
};
try {
document.createElement("div").style.setProperty("opacity", 0, "");
Function plot_data
has 435 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function plot_data(dados) {
// Inicialmente remove o spinner de loading
$("#loading").remove();
File radar_plot.js
has 569 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*##############################################################################
# Copyright (C) 2013 Diego Rabatone Oliveira, Leonardo Leite, #
# Saulo Trento #
# #
# This program is free software: you can redistribute it and/or modify #
File analise.py
has 485 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# coding=utf8
# Copyright (C) 2012, Leonardo Leite, Saulo Trento, Diego Rabatone,
# Guilherme Januário
#
File models.py
has 478 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# coding=utf8
# Copyright (C) 2012, Leonardo Leite, Eduardo Hideo, Saulo Trento,
# Diego Rabatone
#
Function tip
has 183 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.tip = function() {
var direction = d3_tip_direction,
offset = d3_tip_offset,
html = d3_tip_html,
node = initNode(),
File cdep.py
has 468 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# !/usr/bin/python
# coding=utf8
# Copyright (C) 2012, Leonardo Leite, Diego Rabatone, Saulo Trento,
# Carolina Ramalho, Brenddon Gontijo Furtado
Function cloud
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function cloud() {
var size = [256, 256],
text = cloudText,
font = cloudFont,
fontSize = cloudFontSize,
Function axis
has 146 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.svg.axis = function() {
var scale = d3.scale.linear(),
orient = "bottom",
tickMajorSize = 6,
tickMinorSize = 6,
Function brush
has 137 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.svg.brush = function() {
var event = d3.dispatch("brushstart", "brush", "brushend"),
x, // x-scale, optional
y, // y-scale, optional
extent = [[0, 0], [0, 0]]; // [x0, y0], [x1, y1]
Function atualiza_grafico
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function atualiza_grafico(explodindo) {
label_nvotacoes.text("Não há votações relacionadas com as palavras chave informadas");
File d3.layout.cloud.js
has 351 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Word cloud layout by Jason Davies, http://www.jasondavies.com/word-cloud/
// Algorithm due to Jonathan Feinberg, http://static.mrfeinberg.com/bv_ch03.pdf
(function() {
function cloud() {
var size = [256, 256],
Function plot_data
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function plot_data() {
$("#controle").empty();
$("#graficoplenaria").empty();
Function axis
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function axis(selection) {
selection.each(function(d, i, j) {
var g = d3.select(this);
// If selection is a transition, create subtransitions.
Function data
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3_selectionPrototype.data = function(data, join) {
var enter = [],
update = [],
exit = [];
Function tip
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
Open
d3.tip = function() {
var direction = d3_tip_direction,
offset = d3_tip_offset,
html = d3_tip_html,
node = initNode(),
- 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 desenhar
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function desenhar(partido){
d3.json("/static/files/codes/js/genero_historia_partidos.json", function(error, data) {
Function desenhar
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function desenhar(legislatura){
d3.json("/static/files/codes/js/genero_comparativo_partidos.json", function(error, passa_dados) {
dados = passa_dados[legislatura];
data = [];
Function cloudSprite
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function cloudSprite(d, data, di) {
if (d.sprite) return;
c.clearRect(0, 0, (cw << 5) / ratio, ch / ratio);
var x = 0,
y = 0,
File sen.py
has 289 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# !/usr/bin/python
# coding=utf8
# Copyright (C) 2012, Leonardo Leite
#