Showing 419 of 859 total issues
Function easyPieChart
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.easyPieChart = function(el, options) {
var addScaleLine, animateLine, drawLine, easeInOutQuad, rAF, renderBackground, renderScale, renderTrack,
_this = this;
this.el = el;
Function model
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Open
model: function() {
// Screenshot base asset directory
var sb = "/assets/app-screens/";
// The apps page only lists actively supported, community made apps.
Function _create
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
this.element.closest( "form" )
.unbind( "reset" + this.eventNamespace )
.bind( "reset" + this.eventNamespace, formResetHandler );
Function _bindEvents
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
_bindEvents: function() {
var self = this;
var button = this.button;
function clickHandler() {
File fastclick.js
has 382 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
*
* @version 0.6.11
* @codingstandard ftlabs-jsv2
File fastclick.js
has 382 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
*
* @version 0.6.11
* @codingstandard ftlabs-jsv2
Function scan
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Hogan.scan = function scan(text, delimiters) {
var len = text.length,
IN_TEXT = 0,
IN_TAG_TYPE = 1,
IN_TAG = 2,
Method metadata
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def metadata
meta = {
external_id: @mal_id,
title: {
canonical: @main_noko.css('h1').children[0].text.strip,
- 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 _create
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
var n, i, handle, axis, hname,
that = this,
o = this.options;
Method perform
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def perform(user_id)
return
user = User.find(user_id)
# Get a user's list and favorite genres.
- 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 anonymous
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
var $0 = $$.length - 1;
switch (yystate) {
case 1: return $$[$0-1];
Method search
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def search
respond_to do |format|
format.json do
query = params.require(:query)
- 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 parse
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
parse: function parse(input) {
var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
this.lexer.setInput(input);
this.lexer.yy = this.yy;
this.yy.lexer = this.lexer;
Method apply!
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def apply!
table = (list == "manga") ? Manga : Anime
media_list = table.where(mal_id: data.map {|x| x[:mal_id] }).index_by(&:mal_id)
failures = []
count = 0
- 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 perform
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
def perform(user_id)
return
user = User.find(user_id)
# Get a user's list and favorite genres.
Class User
has 29 methods (exceeds 20 allowed). Consider refactoring. Open
class User < ActiveRecord::Base
# Friendly ID.
def to_param
name
end
Function _refresh
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
_refresh: function() {
var maxHeight,
options = this.options,
heightStyle = options.heightStyle,
parent = this.element.parent(),
Method create_or_update_from_hash
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def self.create_or_update_from_hash(hash)
# First the creation logic
# TODO: stop hard-coding the ID column
anime = Anime.find_by(mal_id: hash[:external_id])
if anime.nil? && Anime.where(title: hash[:title][:canonical]).count > 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 lifeSpentOnAnimeFmt
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
lifeSpentOnAnimeFmt: function () {
var days, hours, minutes, months, str, years;
minutes = this.get('userInfo.lifeSpentOnAnime');
if (minutes === 0) { return "0 minutes"; }
- 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 _doKeyDown
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
_doKeyDown: function(event) {
var onSelect, dateStr, sel,
inst = $.datepicker._getInst(event.target),
handled = true,
isRTL = inst.dpDiv.is(".ui-datepicker-rtl");