Showing 463 of 531 total issues
File 08-jquery.ui.autocomplete.js
has 471 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery UI Autocomplete 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
Method call
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
Open
def call(context, page)
geometry = context.params[:geometry]
trim = context.params[:trim]
ps = page.mime.to_s =~ /postscript/
if ps || page.mime == 'application/pdf'
- 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 _setDimension
has 167 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_setDimension: function () {
var viewport = F.getViewport(),
steps = 0,
canShrink = false,
canExpand = false,
File 06-jquery.ui.position.js
has 419 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery UI Position 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
Function position
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.position = function( options ) {
if ( !options || !options.of ) {
return _position.apply( this, arguments );
}
File 05-jquery.ui.widget.js
has 403 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery UI Widget 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
Function itself
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var itself = function (s, o) {
var a, i;
JSLINT.errors = [];
predefined = Object.create(standard);
if (o) {
Function itself
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var itself = function (s, o) {
var a, i;
JSLINT.errors = [];
predefined = Object.create(standard);
if (o) {
File rugged_repository.rb
has 398 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
description 'Git repository backend (Using rugged library)'
require 'rugged'
require 'fileutils'
class RuggedRepository < Repository
Class Page
has 40 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Page
include Util
include Hooks
include Attributes
Function treeView
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.treeView = function(options) {
if (!options) {
options = {};
}
if (!options.root) {
Function Callbacks
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.Callbacks = function( options ) {
// Convert options from String-formatted to Object-formatted if needed
// (we check in cache first)
options = typeof options === "string" ?
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;
Function support
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.support = (function() {
var support, all, a,
input, select, fragment,
opt, eventName, isSupported, i,
Function doTag
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function doTag(n, a) {
var i, t = htmltag[n], x;
src = false;
if (!t) {
error("Unrecognized tag '<{a}>'.",
Function doTag
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function doTag(n, a) {
var i, t = htmltag[n], x;
src = false;
if (!t) {
error("Unrecognized tag '<{a}>'.",
Function styleSelector
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function styleSelector() {
if (nexttoken.identifier) {
if (!is_own(htmltag, option.cap ?
nexttoken.value.toLowerCase() : nexttoken.value)) {
warning("Expected a tagName, and instead saw {a}.",
Function styleSelector
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function styleSelector() {
if (nexttoken.identifier) {
if (!is_own(htmltag, option.cap ?
nexttoken.value.toLowerCase() : nexttoken.value)) {
warning("Expected a tagName, and instead saw {a}.",
Function string
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function string(x) {
var c, j, r = '';
if (jsonmode && x !== '"') {
warningAt("Strings must use doublequote.",
Function string
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function string(x) {
var c, j, r = '';
if (jsonmode && x !== '"') {
warningAt("Strings must use doublequote.",