Showing 390 of 605 total issues
File prototype.js
has 4969 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Prototype JavaScript framework, version 1.7
* (c) 2005-2010 Sam Stephenson
*
* Prototype is freely distributable under the terms of an MIT-style license.
* For details, see the Prototype web site: http://www.prototypejs.org/
File sprydata.js
has 3391 lines of code (exceeds 250 allowed). Consider refactoring. Open
// SpryData.js - version 0.47 - Spry Pre-Release 1.6.1
//
// Copyright (c) 2006. Adobe Systems Incorporated.
// All rights reserved.
//
Function swfobject
has a Cognitive Complexity of 401 (exceeds 5 allowed). Consider refactoring. Open
var swfobject = function() {
var UNDEF = "undefined",
OBJECT = "object",
SHOCKWAVE_FLASH = "Shockwave Flash",
- 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 spryvalidationtextfield.js
has 1933 lines of code (exceeds 250 allowed). Consider refactoring. Open
// SpryValidationTextField.js - version 0.37 - Spry Pre-Release 1.6.1
//
// Copyright (c) 2006. Adobe Systems Incorporated.
// All rights reserved.
//
File xpath.js
has 1777 lines of code (exceeds 250 allowed). Consider refactoring. Open
// xpath.js - version 0.7 - Spry Pre-Release 1.6.1
//
// Code from xmltoken.js.
//
// Copyright 2006 Google Inc.
Function onKeyPress
has a Cognitive Complexity of 165 (exceeds 5 allowed). Consider refactoring. Open
Spry.Widget.ValidationTextField.prototype.onKeyPress = function(e)
{
if (this.flags.skp) {
this.flags.skp = false;
Spry.Widget.Utils.stopEvent(e);
- 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 swfobject
has 576 lines of code (exceeds 25 allowed). Consider refactoring. Open
var swfobject = function() {
var UNDEF = "undefined",
OBJECT = "object",
SHOCKWAVE_FLASH = "Shockwave Flash",
File effects.js
has 1014 lines of code (exceeds 250 allowed). Consider refactoring. Open
// script.aculo.us effects.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
// Contributors:
// Justin Palmer (http://encytemedia.com/)
Function initRegions
has a Cognitive Complexity of 116 (exceeds 5 allowed). Consider refactoring. Open
Spry.Data.initRegions = function(rootNode)
{
rootNode = rootNode ? Spry.$(rootNode) : document.body;
var lastRegionFound = null;
- 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 processTokens
has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring. Open
Spry.Data.Region.prototype.processTokens = function(outputArr, token, processContext)
{
var i = 0;
switch(token.tokenType)
- 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 swfobject_modified.js
has 578 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*! SWFObject v2.0 <http://code.google.com/p/swfobject/>
Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis
This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
Function flattenSubPaths
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
Spry.Data.XMLDataSet.prototype.flattenSubPaths = function(rs, subPaths)
{
if (!rs || !subPaths)
return;
- 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 tokenizeData
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
Spry.Data.Region.prototype.tokenizeData = function(dataStr)
{
// If there is no data, there's nothing to do.
if (!dataStr)
return null;
- 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 onKeyPress
has 214 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spry.Widget.ValidationTextField.prototype.onKeyPress = function(e)
{
if (this.flags.skp) {
this.flags.skp = false;
Spry.Widget.Utils.stopEvent(e);
Function Enumerable
has 209 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Enumerable = (function() {
function each(iterator, context) {
var index = 0;
try {
this._each(function(value) {
Function punycode_encode
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
Spry.Widget.Utils.punycode_encode = function (input, max_out) {
var inputc = input.split("");
input = [];
for(var i=0; i<inputc.length; i++) {
input.push(inputc[i].charCodeAt(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
Function compare
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
BinaryExpr.prototype.compare = function(ctx, cmp) {
var v1 = this.expr1.evaluate(ctx);
var v2 = this.expr2.evaluate(ctx);
var ret;
- 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 initRegions
has 171 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spry.Data.initRegions = function(rootNode)
{
rootNode = rootNode ? Spry.$(rootNode) : document.body;
var lastRegionFound = null;
Function doValidations
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
Spry.Widget.ValidationTextField.prototype.doValidations = function(testValue, revertValue)
{
if (this.isDisabled()) return false;
if (this.flags.locked) {
- 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
Methods
has 48 functions (exceeds 20 allowed). Consider refactoring. Open
Element.Methods = {
visible: function(element) {
return $(element).style.display != 'none';
},