CrazySquirrel/CSShare

View on GitHub

Showing 85 of 85 total issues

Function Tiles has 506 lines of code (exceeds 25 allowed). Consider refactoring.
Open

$.CrazySquirrel.Tiles = function(that, settings){
/**
* Pointer to this object
* @type {object}
*/
Severity: Major
Found in js/jquery.CSTiles-1.1.0.js - About 2 days to fix

File jquery.CSTiles-1.1.0.js has 546 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
* CrazySquirrel
* http://crazysquirrel.ru/
*
* @author Yastrebov Sergey
Severity: Major
Found in js/jquery.CSTiles-1.1.0.js - About 1 day to fix

Function has too many statements (81). Maximum allowed is 30.
Open

base.Build = function(){
Severity: Minor
Found in js/jquery.CSTiles-1.1.0.js by eslint

Identical blocks of code found in 2 locations. Consider refactoring.
Open

for(j=1;j<x.length;j++){
z = x[j].split("_");
if(z.length>1){
for(k=1;k<z.length;k++){
z[k] = z[k].slice(0,1).toUpperCase() + z[k].slice(1).toLowerCase();
Severity: Major
Found in js/jquery.CSTiles-1.1.0.js and 1 other location - About 6 hrs to fix
js/jquery.CSShare-1.0.0.js on lines 59..68

Similar blocks of code found in 2 locations. Consider refactoring.
Open

if(typeof settings !== "undefined" && typeof settings[i] !== "undefined"){
for(j in settings[i]){
if(
settings[i].hasOwnProperty(j) &&
base.settings.adaptivMedia.hasOwnProperty(j)
Severity: Major
Found in js/jquery.CSTiles-1.1.0.js and 1 other location - About 6 hrs to fix
js/jquery.CSTiles-1.1.0.js on lines 194..210

Similar blocks of code found in 2 locations. Consider refactoring.
Open

}else if(typeof data !== "undefined" && typeof data[i] !== "undefined"){
for(j in data[i]){
if(
data[i].hasOwnProperty(j) &&
base.settings.adaptivMedia.hasOwnProperty(j)
Severity: Major
Found in js/jquery.CSTiles-1.1.0.js and 1 other location - About 6 hrs to fix
js/jquery.CSTiles-1.1.0.js on lines 180..210

Identical blocks of code found in 2 locations. Consider refactoring.
Open

for(j=1;j<x.length;j++){
z = x[j].split("_");
if(z.length>1){
for(k=1;k<z.length;k++){
z[k] = z[k].slice(0,1).toUpperCase() + z[k].slice(1).toLowerCase();
Severity: Major
Found in js/jquery.CSShare-1.0.0.js and 1 other location - About 6 hrs to fix
js/jquery.CSTiles-1.1.0.js on lines 99..108

Identical blocks of code found in 2 locations. Consider refactoring.
Open

for(j=0;j<y.length;j++){
if(y[j] === "Y" || y[j] === "true"){y[j] = true;} else
if(y[j] === "N" || y[j] === "false"){y[j] = false;} else
if(!isNaN(parseFloat(y[j])) && isFinite(y[j])){y[j] = parseInt(y[j]);}
}
Severity: Major
Found in js/jquery.CSShare-1.0.0.js and 1 other location - About 6 hrs to fix
js/jquery.CSTiles-1.1.0.js on lines 88..92

Identical blocks of code found in 2 locations. Consider refactoring.
Open

for(j=0;j<y.length;j++){
if(y[j] === "Y" || y[j] === "true"){y[j] = true;} else
if(y[j] === "N" || y[j] === "false"){y[j] = false;} else
if(!isNaN(parseFloat(y[j])) && isFinite(y[j])){y[j] = parseInt(y[j]);}
}
Severity: Major
Found in js/jquery.CSTiles-1.1.0.js and 1 other location - About 6 hrs to fix
js/jquery.CSShare-1.0.0.js on lines 48..52

Function Init has 146 lines of code (exceeds 25 allowed). Consider refactoring.
Open

base.Init = function(){
var i,j,x;
var data = base.getSettingsFromData(base.that);
Severity: Major
Found in js/jquery.CSTiles-1.1.0.js - About 5 hrs to fix

Function Share has 137 lines of code (exceeds 25 allowed). Consider refactoring.
Open

$.CrazySquirrel.Share = function(that, settings){
var i,x;
/**
* Pointer to this object
* @type {object}
Severity: Major
Found in js/jquery.CSShare-1.0.0.js - About 5 hrs to fix

Similar blocks of code found in 2 locations. Consider refactoring.
Open

default:
if(typeof settings !== "undefined" && typeof settings[i] !== "undefined"){
base.settings[i] = settings[i];
}else if(typeof data !== "undefined" && typeof data[i] !== "undefined"){
base.settings[i] = data[i];
Severity: Major
Found in js/jquery.CSTiles-1.1.0.js and 1 other location - About 4 hrs to fix
js/jquery.CSShare-1.0.0.js on lines 87..95

Similar blocks of code found in 2 locations. Consider refactoring.
Open

default:
if(typeof settings !== "undefined" && typeof settings[i] !== "undefined"){
base.settings[i] = settings[i];
}else if(typeof data !== "undefined" && typeof data[i] !== "undefined"){
base.settings[i] = data[i];
Severity: Major
Found in js/jquery.CSShare-1.0.0.js and 1 other location - About 4 hrs to fix
js/jquery.CSTiles-1.1.0.js on lines 163..171

Function Build has 120 lines of code (exceeds 25 allowed). Consider refactoring.
Open

base.Build = function(){
var i,j,k,h,g,x,y,z,e,image,media,gridSize,tiles,height,grid,size,padding,margin,_height,fainder,html,make;
for(i in base.settings.adaptivMedia){
if(base.settings.adaptivMedia.hasOwnProperty(i)){
Severity: Major
Found in js/jquery.CSTiles-1.1.0.js - About 4 hrs to fix

Function has a complexity of 32.
Open

base.Build = function(){
Severity: Minor
Found in js/jquery.CSTiles-1.1.0.js by eslint

Function has too many statements (50). Maximum allowed is 30.
Open

function(){
Severity: Minor
Found in js/jquery.CSShare-1.0.0.js by eslint

Function has a complexity of 23.
Open

base.getSettingsFromData = function(that){
Severity: Minor
Found in js/jquery.CSTiles-1.1.0.js by eslint

Function has a complexity of 20.
Open

base.Init = function(){
Severity: Minor
Found in js/jquery.CSTiles-1.1.0.js by eslint

Function has a complexity of 20.
Open

function(){
Severity: Minor
Found in js/jquery.CSTiles-1.1.0.js by eslint

Function has a complexity of 16.
Open

base.findGridPlace = function(size,grid,scale){
Severity: Minor
Found in js/jquery.CSTiles-1.1.0.js by eslint
Severity
Category
Status
Source
Language