Showing 26 of 357 total issues
File buildbug.js
has 441 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Copyright (c) 2016 airbug Inc. http://airbug.com
*
* bugcore may be freely distributed under the MIT license.
*/
File ObjectUtil.js
has 321 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Copyright (c) 2016 airbug Inc. http://airbug.com
*
* bugcore may be freely distributed under the MIT license.
*/
File Promise.js
has 297 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Copyright (c) 2016 airbug Inc. http://airbug.com
*
* bugcore may be freely distributed under the MIT license.
*/
Function _constructor
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_constructor: function() {
this._super();
Function hash
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
HashUtil.hash = function(value) {
var key = "";
var type = TypeUtil.toType(value);
switch (type) {
case "arguments":
Function extend
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Class.extend = function(constructor, declaration) {
var _super = constructor.prototype;
Class.extending = true;
var prototype = new constructor();
Class.extending = false;
Function processDescriptions
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ArgUtil.processDescriptions = function(args, descriptions) {
ArgUtil.validateDescriptions(descriptions, args.length);
var argsCopy = ([]).concat(args);
var descriptionsCopy = ([]).concat(descriptions);
Function setPath
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setPath: function(path, value) {
if (path === "") {
this.data = value;
} else {
if (!TypeUtil.isObject(this.data) && !TypeUtil.isArray(this.data)) {
Function generateStackTrace
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
StackTraceUtil.generateStackTrace = function() {
var callstack = [];
var isCallstackPopulated = false;
//NOTE BRN: See more info about this line https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
Function indexOf
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ArrayUtil.indexOf = function(array, search, fromIndex) {
if (!TypeUtil.isArray(array)) {
throw new TypeError( "'array' must be an Array");
}
var length = array.length >>> 0; // Hack to convert object.length to a UInt32
Function renderSentAgo
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
DateUtil.renderSentAgo = function(timestampDate) {
var nowDate = new Date();
var nowUTC = nowDate.getTime();
var yesterdayDate = new Date(nowUTC - (1000 * 60 * 60 * 24));
var timestampUTC = timestampDate.getTime()
Function resolveValueAsObject
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
resolveValueAsObject: function(object, fulfilledCallback, rejectedCallback) {
var _this = this;
try {
var then = object.then;
if (TypeUtil.isFunction(then)) {
Function iterate
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ObjectUtil.iterate = function(object, iteratee, options) {
if (!TypeUtil.isObjectLike(object)) {
throw new TypeError("'object' must be Object like");
}
if (!iteratee || (iteratee && !iteratee.call)) {
Function clone
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Obj.clone = function(value, deep) {
var clone = null;
if (TypeUtil.isDate(value)) {
clone = new Date();
clone.setTime(value.getTime());
Function sortBugpackRequires
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var sortBugpackRequires = function(fileContents) {
var lines = generateLines(fileContents);
lines.sort(function(a, b) {
var resultsA = a.line.match(/^\s*var \w+\s+=\s+bugpack\.require\(('|")((?:\w|\.)*)\1\);\s*$/);
var resultsB = b.line.match(/^\s*var \w+\s+=\s+bugpack\.require\(('|")((?:\w|\.)*)\1\);\s*$/);
Function sortRequireAnnotations
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var sortRequireAnnotations = function(fileContents) {
var lines = generateLines(fileContents);
lines.sort(function(a, b) {
var resultsA = a.line.match(/^\s*\/\/\s*@Require\(('|")((?:\w|\.)*)\1\)\s*$/);
var resultsB = b.line.match(/^\s*\/\/\s*@Require\(('|")((?:\w|\.)*)\1\)\s*$/);
Function parse
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Url.parse = function(urlString, options) {
if (!options) {
options = {};
}
var finalOptions = {
Function equals
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Obj.equals = function(value1, value2) {
if (Class.doesImplement(value1, IEquals)) {
return value1.equals(value2);
}
var type1 = TypeUtil.toType(value1);
Function toString
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
toString: function() {
var output = "";
output += this.getProtocol() + "://";
output += this.getHost();
if (this.getPort() && this.getPort() !== 80) {
Avoid deeply nested control flow statements. Open
Open
if (childTrace.getName() === name) {
nextTrace = childTrace;
break;
}