Showing 332 of 436 total issues
File highcharts-3.0.7.src.js
has 11199 lines of code (exceeds 250 allowed). Consider refactoring. Open
// ==ClosureCompiler==
// @compilation_level SIMPLE_OPTIMIZATIONS
/**
* @license Highcharts JS v3.0.7 (2013-10-24)
File jquery.sparkline.js
has 2441 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
*
* jquery.sparkline.js
*
* v2.1.1
File select2.js
has 1712 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
Copyright 2012 Igor Vaynberg
Version: 3.2 Timestamp: Mon Sep 10 10:38:04 PDT 2012
Method finalize_report_table
has a Cognitive Complexity of 153 (exceeds 5 allowed). Consider refactoring. Open
def finalize_report_table(current_user, include_html = true)
result_hash = self.generate_report_table(current_user)
values = result_hash[:values]
- 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 TokenList
has 480 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.TokenList = function (input, url_or_data, settings) {
//
// Initialization
//
File jquery.tokeninput.js
has 590 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* jQuery Plugin: Tokenizing Autocomplete Text Entry
* Version 1.5.0
*
* Copyright (c) 2009 James Smith (http://loopj.com)
Method generate_report_table
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
def generate_report_table(current_user)
filtered_report_concepts = self.report_concepts.select{|rc| not rc.position.blank?}
values = self.search.view_concept_values(current_user, filtered_report_concepts)
row_values = []
- 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 drawDataLabels
has 201 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawDataLabels: function () {
var series = this,
data = series.data,
point,
chart = series.chart,
Function label
has 198 lines of code (exceeds 25 allowed). Consider refactoring. Open
label: function (str, x, y, shape, anchorX, anchorY, useHTML, baseline, className) {
var renderer = this,
wrapper = renderer.g(className),
text = renderer.text('', 0, 0, useHTML)
Function attr
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
attr: function (hash, val) {
var wrapper = this,
key,
value,
result,
Function render
has 159 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
var options = this.options,
target = this.target,
canvasWidth = this.canvasWidth,
canvasHeight = this.canvasHeight,
Function render
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
var axis = this,
chart = axis.chart,
renderer = chart.renderer,
options = axis.options,
Method generate_sql_as_normal
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
def generate_sql_as_normal(thesource)
result = "1 = 0"
result_hash = thesource.sql_codes(current_user)
sql_text = result_hash[:text]
- 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 setTickPositions
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
setTickPositions: function (secondPass) {
var axis = this,
chart = axis.chart,
options = axis.options,
isLog = axis.isLog,
Function attr
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
attr: function (hash, val) {
var wrapper = this,
key,
value,
i,
Function getOffset
has 138 lines of code (exceeds 25 allowed). Consider refactoring. Open
getOffset: function () {
var axis = this,
chart = axis.chart,
renderer = chart.renderer,
options = axis.options,
Function render
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
var target = this.target,
values = this.values,
vlen = values.length,
options = this.options,
Function buildText
has 124 lines of code (exceeds 25 allowed). Consider refactoring. Open
buildText: function (wrapper) {
var textNode = wrapper.element,
renderer = this,
forExport = renderer.forExport,
lines = pick(wrapper.textStr, '').toString()
Function render
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
var plotLine = this,
axis = plotLine.axis,
horiz = axis.horiz,
halfPointRange = (axis.pointRange || 0) / 2,
Function color
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
color: function (color, elem, prop, wrapper) {
var renderer = this,
colorObject,
regexRgba = /^rgba/,
markup,