Showing 446 of 1,255 total issues
File d3.v2.js
has 7026 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
(function() {
function d3_class(ctor, properties) {
try {
for (var key in properties) {
Object.defineProperty(ctor.prototype, key, {
File masonry.pkgd.js
has 1624 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* Masonry PACKAGED v3.1.2
* Cascading grid layout library
* http://masonry.desandro.com
* MIT License
File jquery.magnific-popup.js
has 1398 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*! Magnific Popup - v1.0.0 - 2015-01-03
* http://dimsemenov.com/plugins/magnific-popup/
* Copyright (c) 2015 Dmitry Semenov; */
;(function (factory) {
if (typeof define === 'function' && define.amd) {
File focus_home.js
has 1393 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* Masonry PACKAGED v3.1.5
* Cascading grid layout library
* http://masonry.desandro.com
* MIT License
Function outlayerDefinition
has 484 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function outlayerDefinition( eventie, docReady, EventEmitter, getSize, matchesSelector, Item ) {
// -------------------------- Outlayer -------------------------- //
// globally unique identifiers
Class Product
has 112 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Product < ActiveRecord::Base
include ActiveRecord::UUID
include Kaminari::ActiveRecordModelExtension
include Elasticsearch::Model
include GlobalID::Identification
Function render
has 386 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render: function() {
var background = 'linear-gradient(160deg, rgba(255, 232, 80, .8), rgba(26, 88, 131, .85) 70%), url(' + this.props.mastheadUrl + ')';
return (
<div className="mt0 mb3">
<div className="masthead" style={{background: background, paddingTop: 0}}>
Function render
has 355 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render: function() {
var background = 'linear-gradient(160deg, rgba(255, 232, 80, .8), rgba(26, 88, 131, .85) 70%), url(' + this.props.mastheadUrl + ')';
return (
<div className="mt0 mb3">
<div className="masthead" style={{background: background, paddingTop: 0}}>
Function outlayerItemDefinition
has 295 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function outlayerItemDefinition( EventEmitter, getSize, getStyleProperty ) {
// -------------------------- CSS3 support -------------------------- //
var transitionProperty = getStyleProperty('transition');
Function d3_voronoi_tessellate
has 268 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_voronoi_tessellate(vertices, callback) {
var Sites = {
list: vertices.map(function(v, i) {
return {
index: i,
File product.rb
has 607 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require 'money'
require './lib/poster_image'
require 'elasticsearch/model'
class Product < ActiveRecord::Base
File routes.js
has 590 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// This is a generated file, to regen run:
// rake js:routes
var exports = module.exports = {};
exports.api_org_bounties_path = function(options){
File jquery.autocomplete.js
has 572 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Ajax Autocomplete for jQuery, version 1.2.7
* (c) 2013 Tomas Kirda
*
* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
Class User
has 64 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class User < ActiveRecord::Base
include ActiveRecord::UUID
include Elasticsearch::Model
include GlobalID::Identification
include Kaminari::ActiveRecordModelExtension
Function brush
has 213 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.svg.brush = function() {
function brush(g) {
g.each(function() {
var g = d3.select(this), bg = g.selectAll(".background").data([ 0 ]), fg = g.selectAll(".extent").data([ 0 ]), tz = g.selectAll(".resize").data(resizes, String), e;
g.style("pointer-events", "all").on("mousedown.brush", brushstart).on("touchstart.brush", brushstart);
Function force
has 210 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.layout.force = function() {
function repulse(node) {
return function(quad, x1, y1, x2, y2) {
if (quad.point !== node) {
var dx = quad.cx - node.x, dy = quad.cy - node.y, dn = 1 / Math.sqrt(dx * dx + dy * dy);
Function draw
has 191 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
draw: function(id, d, options){
var cfg = {
radius: 5,
w: 600,
h: 600,
Class Wip
has 51 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Wip < ActiveRecord::Base
include ActiveRecord::UUID
include Elasticsearch::Model
include Kaminari::ActiveRecordModelExtension
include Workflow
Method response_times
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
Open
def self.response_times(product:, time: Time.now)
response_times = { "core" => [], "noncore" => [], "comments_count" => 0 }
# need to join on NFIs since comments are now attached to those
- 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
File dashboard_index.js.jsx
has 436 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
const App = require('../app.js.jsx')
const AppIcon = require('../app_icon.js.jsx')
const BountyCard = require('../bounty_card.js.jsx')