Showing 332 of 436 total issues
Function adjustForMinRange
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
adjustForMinRange: function () {
var axis = this,
options = axis.options,
min = axis.min,
max = axis.max,
Function getColumnMetrics
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getColumnMetrics: function () {
var series = this,
options = series.options,
xAxis = series.xAxis,
Function setChartSize
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setChartSize: function (skipAxes) {
var chart = this,
inverted = chart.inverted,
renderer = chart.renderer,
chartWidth = chart.chartWidth,
Function setAxisTranslation
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setAxisTranslation: function (saveOld) {
var axis = this,
range = axis.max - axis.min,
pointRange = 0,
closestPointRange,
Function init
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init: function (elem, fromD, toD) {
fromD = fromD || '';
var shift = elem.shift,
bezier = fromD.indexOf('C') > -1,
numParams = bezier ? 7 : 3,
Function runPointActions
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
runPointActions: function (e) {
var pointer = this,
chart = pointer.chart,
series = chart.series,
tooltip = chart.tooltip,
Function shadow
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
shadow: function (shadowOptions, group, cutOff) {
var shadows = [],
i,
element = this.element,
renderer = this.renderer,
Method graph_values_short
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Open
def graph_values_short(current_user)
values = self.all_values_for_column(current_user)[:values]
case self.variable.variable_type when 'integer'
values = values.select{|v| not v.blank?}.collect{|num_string| num_string.to_i} # Ignore null and blank 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 scroll
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
scroll: function (scrollBy, animation) {
var pageCount = this.pageCount,
currentPage = this.currentPage + scrollBy,
clipHeight = this.clipHeight,
navOptions = this.options.navigation,
Function destroy
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
destroy: function () {
var series = this,
chart = series.chart,
issue134 = /AppleWebKit\/533/.test(userAgent),
destroy,
Function setSize
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setSize: function (width, height, animation) {
var chart = this,
chartWidth,
chartHeight,
fireEndResize;
Function processData
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
processData: function (force) {
var series = this,
processedXData = series.xData, // copied during slice operation below
processedYData = series.yData,
dataLength = processedXData.length,
Function generatePoints
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
generatePoints: function () {
var series = this,
options = series.options,
dataOptions = options.data,
data = series.data,
Function setTooltipPoints
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setTooltipPoints: function (renew) {
var series = this,
points = [],
pointsLength,
low,
Function arc
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
arc: function (x, y, w, h, options) {
var start = options.start,
end = options.end,
radius = options.r || w || h,
innerRadius = options.innerR,
Function setScale
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setScale: function () {
var axis = this,
stacks = axis.stacks,
type,
i,
Function add
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
wrapper.add = function (svgGroupWrapper) {
var htmlGroup,
container = renderer.box.parentNode,
parentGroup,
Function drop
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
drop: function (e) {
var chart = this.chart,
hasPinched = this.hasPinched;
if (this.selectionMarker) {
Function justifyDataLabel
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
justifyDataLabel: function (dataLabel, options, alignAttr, bBox, alignTo, isNew) {
var chart = this.chart,
align = options.align,
verticalAlign = options.verticalAlign,
off,
Function animate
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
animate: function (init) {
var series = this,
chart = series.chart,
renderer = chart.renderer,
clipRect,