Showing 463 of 531 total issues
Class RuggedRepository
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class RuggedRepository < Repository
CONTENT_EXT = '.content'
ATTRIBUTE_EXT = '.attributes'
class Blob
Function send
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
send: function( headers, complete ) {
// Get a new xhr
var handle, i,
xhr = s.xhr();
Function labelled
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
blockstmt('for', function () {
var f = option.forin, s, t = nexttoken;
funct['(breakage)'] += 1;
funct['(loopage)'] += 1;
advance('(');
Function _keydown
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_keydown: function( event ) {
/*jshint maxcomplexity:20*/
var match, prev, character, skip, regex,
preventDefault = true;
Function labelled
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
blockstmt('for', function () {
var f = option.forin, s, t = nexttoken;
funct['(breakage)'] += 1;
funct['(loopage)'] += 1;
advance('(');
Function nud
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
x.nud = function () {
var b, f, i, j, p, seen = {}, t;
b = token.line !== nexttoken.line;
if (b) {
indent += option.indent;
Function nud
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
x.nud = function () {
var b, f, i, j, p, seen = {}, t;
b = token.line !== nexttoken.line;
if (b) {
indent += option.indent;
Method parse
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
Open
def self.parse(patch, *h)
h = h.size == 1 ? h[0] : Adapter.new(h)
src = dst = nil
state = :start
h.initialize!
- 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 Sizzle
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Sizzle( selector, context, results, seed ) {
var match, elem, m, nodeType,
// QSA vars
i, groups, old, nid, newContext, newSelector;
Function buildFragment
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
buildFragment: function( elems, context, scripts, selection ) {
var j, elem, contains,
tmp, tag, tbody, wrap,
l = elems.length,
File helper.rb
has 289 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
module Olelo
module BlockHelper
def blocks
@blocks ||= Hash.new('')
end
Function openTree
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function openTree(element, path) {
// Cache key for cached json data
var cacheKey = options.cacheStore ? options.cacheStore + ':' + path : null;
// Store json in cache
Function _create
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
this.activeMenu = this.element;
// flag used to prevent firing of the click handler
// as the event bubbles up through nested menus
this.mouseHandled = false;
Function widget
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.widget = function( name, base, prototype ) {
var fullName, existingConstructor, constructor, basePrototype,
// proxiedPrototype allows the provided prototype to remain unmodified
// so that it can be used as a mixin for multiple widgets (#8876)
proxiedPrototype = {},
Function data
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
itself.data = function () {
var data = {functions: []}, fu, globals, implieds = [], f, i, j,
members = [], n, unused = [], v;
if (itself.errors.length) {
Function data
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
itself.data = function () {
var data = {functions: []}, fu, globals, implieds = [], f, i, j,
members = [], n, unused = [], v;
if (itself.errors.length) {
Function matcherFromGroupMatchers
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
// A counter to specify which element is currently being matched
var matcherCachedRuns = 0,
bySet = setMatchers.length > 0,
byElement = elementMatchers.length > 0,
Function domManip
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
domManip: function( args, table, callback ) {
// Flatten any nested arrays
args = core_concat.apply( [], args );
Function add
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
add: function( elem, types, handler, data, selector ) {
var tmp, events, t, handleObjIn,
special, eventHandle, handleObj,
handlers, type, namespaces, origType,
elemData = jQuery._data( elem );
Function str
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function str(key, holder) {
// Produce a string from holder[key].
var i, // The loop counter.