airbug/bugcore

View on GitHub

Showing 26 of 357 total issues

File buildbug.js has 441 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright (c) 2016 airbug Inc. http://airbug.com
 *
 * bugcore may be freely distributed under the MIT license.
 */
Severity: Minor
Found in buildbug.js - About 6 hrs to fix

    File ObjectUtil.js has 321 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * Copyright (c) 2016 airbug Inc. http://airbug.com
     *
     * bugcore may be freely distributed under the MIT license.
     */
    Severity: Minor
    Found in libraries/bugcore/js/src/util/ObjectUtil.js - About 3 hrs to fix

      File Promise.js has 297 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*
       * Copyright (c) 2016 airbug Inc. http://airbug.com
       *
       * bugcore may be freely distributed under the MIT license.
       */
      Severity: Minor
      Found in libraries/bugcore/js/src/promise/Promise.js - About 3 hrs to fix

        Function _constructor has 77 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                _constructor: function() {
        
                    this._super();
        
        
        
        Severity: Major
        Found in libraries/bugcore/js/src/BugCore.js - About 3 hrs to fix

          Function hash has 65 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              HashUtil.hash = function(value) {
                  var key     = "";
                  var type    = TypeUtil.toType(value);
                  switch (type) {
                      case "arguments":
          Severity: Major
          Found in libraries/bugcore/js/src/util/HashUtil.js - About 2 hrs to fix

            Function extend has 58 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                Class.extend = function(constructor, declaration) {
                    var _super = constructor.prototype;
                    Class.extending = true;
                    var prototype = new constructor();
                    Class.extending = false;
            Severity: Major
            Found in libraries/bugcore/js/src/core/Class.js - About 2 hrs to fix

              Function processDescriptions has 49 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  ArgUtil.processDescriptions = function(args, descriptions) {
                      ArgUtil.validateDescriptions(descriptions, args.length);
              
                      var argsCopy                = ([]).concat(args);
                      var descriptionsCopy        = ([]).concat(descriptions);
              Severity: Minor
              Found in libraries/bugcore/js/src/util/ArgUtil.js - About 1 hr to fix

                Function setPath has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        setPath: function(path, value) {
                            if (path === "") {
                                this.data = value;
                            } else {
                                if (!TypeUtil.isObject(this.data) && !TypeUtil.isArray(this.data)) {
                Severity: Minor
                Found in libraries/bugcore/js/src/data/Document.js - About 1 hr to fix

                  Function indexOf has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  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
                  Severity: Minor
                  Found in libraries/bugcore/js/src/util/ArrayUtil.js - About 1 hr to fix

                    Function generateStackTrace has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    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
                    Severity: Minor
                    Found in libraries/bugcore/js/src/util/StackTraceUtil.js - About 1 hr to fix

                      Function renderSentAgo has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      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()
                      Severity: Minor
                      Found in libraries/bugcore/js/src/util/DateUtil.js - About 1 hr to fix

                        Function resolveValueAsObject has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                resolveValueAsObject: function(object, fulfilledCallback, rejectedCallback) {
                                    var _this = this;
                                    try {
                                        var then = object.then;
                                        if (TypeUtil.isFunction(then)) {
                        Severity: Minor
                        Found in libraries/bugcore/js/src/promise/resolvers/ValuesResolver.js - About 1 hr to fix

                          Function clone has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              Obj.clone = function(value, deep) {
                                  var clone = null;
                                  if (TypeUtil.isDate(value)) {
                                      clone = new Date();
                                      clone.setTime(value.getTime());
                          Severity: Minor
                          Found in libraries/bugcore/js/src/core/Obj.js - About 1 hr to fix

                            Function iterate has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                ObjectUtil.iterate = function(object, iteratee, options) {
                                    if (!TypeUtil.isObjectLike(object)) {
                                        throw new TypeError("'object' must be Object like");
                                    }
                                    if (!iteratee || (iteratee && !iteratee.call)) {
                            Severity: Minor
                            Found in libraries/bugcore/js/src/util/ObjectUtil.js - About 1 hr to fix

                              Function sortBugpackRequires has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              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*$/);
                              Severity: Minor
                              Found in lintbug.js - About 1 hr to fix

                                Function sortRequireAnnotations has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                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*$/);
                                Severity: Minor
                                Found in lintbug.js - About 1 hr to fix

                                  Function parse has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      Url.parse = function(urlString, options) {
                                          if (!options) {
                                              options = {};
                                          }
                                          var finalOptions = {
                                  Severity: Minor
                                  Found in libraries/bugcore/js/src/data/Url.js - About 1 hr to fix

                                    Function toString has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            toString: function() {
                                                var output = "";
                                                output += this.getProtocol() + "://";
                                                output += this.getHost();
                                                if (this.getPort() && this.getPort() !== 80) {
                                    Severity: Minor
                                    Found in libraries/bugcore/js/src/data/Url.js - About 1 hr to fix

                                      Function equals has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          Obj.equals = function(value1, value2) {
                                              if (Class.doesImplement(value1, IEquals)) {
                                                  return value1.equals(value2);
                                              }
                                              var type1 = TypeUtil.toType(value1);
                                      Severity: Minor
                                      Found in libraries/bugcore/js/src/core/Obj.js - About 1 hr to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                    if (childTrace.getName() === name) {
                                                                        nextTrace = childTrace;
                                                                        break;
                                                                    }
                                        Severity: Major
                                        Found in libraries/bugcore/js/src/trace/Tracer.js - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language