Showing 993 of 2,083 total issues
Function createTicks
has 183 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.jqplot.MekkoAxisRenderer.prototype.createTicks = function() {
// we're are operating on an axis here
var ticks = this._ticks;
var userTicks = this.ticks;
var name = this.name;
Function draw
has 181 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.jqplot.LineRenderer.prototype.draw = function(ctx, gd, options, plot) {
var i;
// get a copy of the options, so we don't modify the original object.
var opts = $.extend(true, {}, options);
var shadow = (opts.shadow != undefined) ? opts.shadow : this.shadow;
File jqplot.dateAxisRenderer.js
has 467 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
* Version: 1.0.0
Function pack
has 178 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.jqplot.CategoryAxisRenderer.prototype.pack = function(pos, offsets) {
var ticks = this._ticks;
var max = this.max;
var min = this.min;
var offmax = offsets.max;
Method add
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
def add(issue)
row = @cards % @label.down
col = Integer(@cards / @label.down) % @label.across
@cards += 1
- 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 init
has 175 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.init = function(target, data, options) {
options = options || {};
for (var i=0; i<$.jqplot.preInitHooks.length; i++) {
$.jqplot.preInitHooks[i].call(this, target, data, options);
}
Method rebuild_issue
has 175 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.rebuild_issue(issue, status=nil)
rb = RbIssueHistory.find_or_initialize_by_issue_id(issue.id)
rb.history = [{:date => issue.created_on.to_date - 1, :origin => :rebuild}]
Function sprintf
has 173 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.jqplot.sprintf = function() {
function pad(str, len, chr, leftJustify) {
var padding = (str.length >= len) ? '' : Array(1 + len - str.length >>> 0).join(chr);
return leftJustify ? str + padding : padding + str;
Method render
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
def render(x, y, pdf, data)
default_stroke_color = pdf.stroke_color
default_fill_color = pdf.fill_color
pdf.bounding_box [x, y], :width => @width, :height => @height do
- 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 pack
has 172 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.jqplot.PyramidAxisRenderer.prototype.pack = function(pos, offsets) {
// Add defaults for repacking from resetTickValues function.
pos = pos || {};
offsets = offsets || this._offsets;
Function map
has 168 lines of code (exceeds 25 allowed). Consider refactoring. Open
map: function (inst) {
var self = this,
e = null,
_mousedown, _mouseup, _mousemove, _html;
Function _generateHTML
has 167 lines of code (exceeds 25 allowed). Consider refactoring. Open
_generateHTML: function(inst) {
var today = new Date();
today = this._daylightSavingAdjust(
new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
var isRTL = this._get(inst, 'isRTL');
File backlogs_printable_cards.rb
has 443 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'rubygems'
require 'prawn'
require 'prawn/measurement_extensions'
require 'net/http'
Method platform_support
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
def platform_support(raise_error = false)
travis = nil # needed so versions isn't block-scoped in the timeout
begin
ReliableTimout.timeout(10) { travis = YAML::load(open('https://raw.github.com/backlogs/redmine_backlogs/master/.travis.yml').read) }
rescue
- 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 draw
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.jqplot.OHLCRenderer.prototype.draw = function(ctx, gd, options) {
var d = this.data;
var xmin = this._xaxis.min;
var xmax = this._xaxis.max;
// index of last value below range of plot.
Function jqplotToImageCanvas
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.jqplotToImageCanvas = function(options) {
options = options || {};
var x_offset = (options.x_offset == null) ? 0 : options.x_offset;
var y_offset = (options.y_offset == null) ? 0 : options.y_offset;
Function draw
has 162 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.jqplot.FunnelRenderer.prototype.draw = function (ctx, gd, options, plot) {
var i;
var opts = (options != undefined) ? options : {};
// offset and direction of offset due to legend placement
var offx = 0;
Function SearchResults
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
function SearchResults(name, mode)
{
/*
var: mode
The mode the search is going to work in, such as "HTML" or "FramedHTML".
- 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
Method backlogs_before_save
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
def backlogs_before_save
if Backlogs.configured?(project)
if (self.is_task? || self.story)
self.remaining_hours = self.estimated_hours if self.remaining_hours.blank?
self.estimated_hours = self.remaining_hours if self.estimated_hours.blank?
- 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
Method update
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
def self.update
# clean up existing labels
malformed_labels = {}
['avery-iso-templates.xml', 'avery-other-templates.xml', 'avery-us-templates.xml', 'brother-other-templates.xml', 'dymo-other-templates.xml',
- 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"