Showing 282 of 417 total issues
Function RGBColor
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
Open
function RGBColor(color_string)
{
this.ok = false;
// strip any leading #
- 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 Gmaps4RailsMapquest
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.Gmaps4RailsMapquest = (function(_super) {
__extends(Gmaps4RailsMapquest, _super);
function Gmaps4RailsMapquest() {
Consider simplifying this complex logical expression. Open
Open
if ( event.pageX == null && original.clientX != null ) {
eventDoc = event.target.ownerDocument || document;
doc = eventDoc.documentElement;
body = eventDoc.body;
File validator.rb
has 364 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require 'csv'
require 'progressbar'
module GroupData
class Validator
Function ElementBase
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
svg.Element.ElementBase = function(node) {
this.attributes = {};
this.styles = {};
this.children = [];
Method convert!
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def convert!
reset = "\r\e[0K"
start = Time.now
Function Sizzle
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Sizzle = function( selector, context, results, seed ) {
results = results || [];
context = context || document;
var origContext = context;
Function build
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.phylogram.build = function(selector, nodes, options) {
options = options || {}
var w = options.width || d3.select(selector).style('width') || d3.select(selector).attr('width'),
h = options.height || d3.select(selector).style('height') || d3.select(selector).attr('height'),
w = parseInt(w),
Function PathParser
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.PathParser = new (function(d) {
this.tokens = d.split(' ');
this.reset = function() {
this.i = -1;
File converter.rb
has 330 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require 'csv'
module SswlData
class Converter
Function trigger
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
trigger: function( event, data, elem, onlyHandlers ) {
// Don't do events on text and comment nodes
if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
return;
}
Function loadXmlDoc
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
svg.loadXmlDoc = function(ctx, dom) {
svg.init(ctx);
var mapXY = function(p) {
var e = ctx.canvas;
Class QueryAdapter
has 29 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class QueryAdapter
include SpecialSearchQueryAdapter
attr_reader :group
Function send
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
send: function( headers, complete ) {
// Get a new xhr
var xhr = s.xhr(),
handle,
Function clean
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
clean: function( elems, context, fragment, scripts ) {
var checkScriptType;
context = context || document;
Function animate
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
animate: function( prop, speed, easing, callback ) {
var optall = jQuery.speed( speed, easing, callback );
if ( jQuery.isEmptyObject( prop ) ) {
return this.each( optall.complete, [ false ] );
Function Transform
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
svg.Transform = function(v) {
var that = this;
this.Type = {}
// translate
Method convert!
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
Open
def convert!
reset = "\r\e[0K"
start = Time.now
- 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 BoundingBox
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
svg.BoundingBox = function(x1, y1, x2, y2) { // pass in initial points if you want
this.x1 = Number.NaN;
this.y1 = Number.NaN;
this.x2 = Number.NaN;
this.y2 = Number.NaN;
Function TextElementBase
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
svg.Element.TextElementBase = function(node) {
this.base = svg.Element.RenderedElementBase;
this.base(node);
this.getGlyph = function(font, text, i) {