Showing 106 of 147 total issues
Function Jcrop
has 1311 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.Jcrop = function (obj, opt) {
var options = $.extend({}, $.Jcrop.defaults),
docOffset, lastcurs, ie6mode = false;
// Internal Methods {{{
File jquery.Jcrop.js
has 1396 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* jquery.Jcrop.js v0.9.10
* jQuery Image Cropping Plugin - released under MIT License
* Author: Kelly Hallman <khallman@gmail.com>
* http://github.com/tapmodo/Jcrop
Function Coords
has 252 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Coords = (function () {
var x1 = 0,
y1 = 0,
x2 = 0,
y2 = 0,
File jquery.color.js
has 553 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jQuery Color Animations v2.0pre
* http://jquery.org/
*
* Copyright 2011 John Resig
Function Selection
has 213 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Selection = (function () {
var awake,
hdep = 370,
borders = {},
handle = {},
Class User
has 57 methods (exceeds 20 allowed). Consider refactoring. Open
class User < ActiveRecord::Base
extend FriendlyId
include UrlUpload
include FacebookProfile
include TwitterProfile
Function _create
has 146 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
// for handling static scoping inside callbacks
var that = this;
// There are 2 kinds of DOM nodes this widget can be instantiated on:
File tag-it.js
has 402 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* jQuery UI Tag-it!
*
* @version v2.0 (06/2011)
*
Class UsersController
has 39 methods (exceeds 20 allowed). Consider refactoring. Open
class UsersController < BaseController
include Viewable
cache_sweeper :taggable_sweeper, :only => [:activate, :update, :destroy]
before_action :login_required, :only => [:edit, :edit_account, :update, :welcome_photo, :welcome_about,
File jquery.migrate.js
has 379 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jQuery Migrate - v1.2.1 - 2013-05-08
* https://github.com/jquery/jquery-migrate
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
*/
Method page_title
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def page_title
divider = " | ".html_safe
app_base = configatron.community_name
tagline = " #{divider} #{configatron.community_tagline}"
- 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 users_controller.rb
has 367 lines of code (exceeds 250 allowed). Consider refactoring. Open
class UsersController < BaseController
include Viewable
cache_sweeper :taggable_sweeper, :only => [:activate, :update, :destroy]
before_action :login_required, :only => [:edit, :edit_account, :update, :welcome_photo, :welcome_about,
File user.rb
has 366 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'digest/sha1'
require 'bcrypt'
class User < ActiveRecord::Base
extend FriendlyId
Method container_title
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def container_title
app_base = configatron.community_name
title = app_base
case controller.controller_name
- 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 Shade
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Shade = (function() {
var enabled = false,
holder = $('<div />').css({
position: 'absolute',
zIndex: 240,
File base_helper.rb
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'digest/md5'
# Methods added to this helper will be available to all templates in the application.
module BaseHelper
include ActsAsTaggableOn::TagsHelper
Method atom_feed_for
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def atom_feed_for(resources, options = {})
xml = Builder::XmlMarkup.new(:indent => 2)
options[:feed] ||= {}
options[:item] ||= {}
- 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 getFixed
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getFixed() //{{{
{
if (!options.aspectRatio) {
return getRect();
}
Function Tracker
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Tracker = (function () {
var onMove = function () {},
onDone = function () {},
trackDoc = options.trackDocument;
Class Post
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
class Post < ActiveRecord::Base
include Rakismet::Model
rakismet_attrs :comment_type => 'post'
acts_as_moderated_commentable