beevelop/corci-monitor

View on GitHub

Showing 256 of 374 total issues

Function makeWithIfBinding has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function makeWithIfBinding(bindingKey, isWith, isNot, makeContextCallback) {
    ko.bindingHandlers[bindingKey] = {
        'init': function(element, valueAccessor, allBindings, viewModel, bindingContext) {
            var didDisplayOnLastUpdate,
                savedNodes;
Severity: Minor
Found in www/js/bundle.js - About 1 hr to fix

    Function renderTemplate has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        ko.renderTemplate = function (template, dataOrBindingContext, options, targetNodeOrNodeArray, renderMode) {
            options = options || {};
            if ((options['templateEngine'] || _templateEngine) == undefined)
                throw new Error("Set a template engine before calling renderTemplate");
            renderMode = renderMode || "replaceChildren";
    Severity: Minor
    Found in www/js/bundle.js - About 1 hr to fix

      Function executeTemplate has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function executeTemplate(targetNodeOrNodeArray, renderMode, template, bindingContext, options) {
              options = options || {};
              var firstTargetNode = targetNodeOrNodeArray && getFirstNodeFromPossibleArray(targetNodeOrNodeArray);
              var templateDocument = firstTargetNode && firstTargetNode.ownerDocument;
              var templateEngineToUse = (options['templateEngine'] || _templateEngine);
      Severity: Minor
      Found in www/js/bundle.js - About 1 hr to fix

        Function canvas has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            canvas: function(data) {
              data = normalizeData(data);
        
              // Module size of the generated QR code (i.e. 1-10).
              var size = data.size >= 1 && data.size <= 10 ? data.size : 4;
        Severity: Minor
        Found in www/js/qr-js/qr.js - About 1 hr to fix

          Function decodePacket has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          exports.decodePacket = function (data, binaryType, utf8decode) {
            // String data
            if (typeof data == 'string' || data === undefined) {
              if (data.charAt(0) == 'b') {
                return exports.decodeBase64Packet(data.substr(1), binaryType);
          Severity: Minor
          Found in www/js/bundle.js - About 1 hr to fix

            Function hasBinary has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function hasBinary(data) {
            
              function _hasBinary(obj) {
                if (!obj) return false;
            
            
            Severity: Minor
            Found in www/js/bundle.js - About 1 hr to fix

              Function 31 has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

              },{}],31:[function(require,module,exports){
              module.exports = after
              
              function after(count, callback, err_cb) {
                  var bail = false
              Severity: Minor
              Found in www/js/bundle.js - About 1 hr to fix

              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 onStatus has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                  'onStatus': function(status) {
                      if (status) {
                          status.agents = status.agents || [];
                          this.logs((status.logs || []).map(function(log) {
                              return new Msg(log);
              Severity: Minor
              Found in www/js/index.js - About 1 hr to fix

              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 format has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  Date[proto].format = function(mask) {
                      mask = Date.masks[mask] || mask || Date.masks["default"]
              
                      var self = this
                      , get = "get" + (mask.slice(0,4) == "UTC:" ? (mask=mask.slice(4), "UTC"):"")
              Severity: Minor
              Found in www/js/bundle.js - About 1 hr to fix

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

                        (arguments.length > 2 || mixins) && (extendeePrototype.hasOwnProperty("__mixins__") || (Object_defineProperties ? (Object_defineProperty(extendeePrototype, "__mixins__", { enumerable: false, value: [], writeable: false }).__mixins__.__hidden = true) : extendeePrototype.__mixins__ = [])) && Array_prototype_forEach.call(arguments, function forEachMixin(mixin, index, mixinValue, isFunction) {
                            isFunction = typeof mixin === 'function';
                            if (isFunction) {
                                __.prototype = mixin.prototype;
                                mixinValue = new mixin(extendeePrototype, constructor);
                Severity: Minor
                Found in www/js/bundle.js - About 1 hr to fix

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

                  exports.deconstructPacket = function(packet){
                    var buffers = [];
                    var packetData = packet.data;
                  
                    function _deconstructPacket(data) {
                  Severity: Minor
                  Found in www/js/bundle.js - About 1 hr to fix

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

                      Tab.prototype.activate = function (element, container, callback) {
                        var $active    = container.find('> .active')
                        var transition = callback
                          && $.support.transition
                          && $active.hasClass('fade')
                    Severity: Minor
                    Found in www/js/bootstrap.js - About 1 hr to fix

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

                      ko.observable = function (initialValue) {
                          var _latestValue = initialValue;
                      
                          function observable() {
                              if (arguments.length > 0) {
                      Severity: Minor
                      Found in www/js/bundle.js - About 1 hr to fix

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

                            function mapJsObjectGraph(rootObject, mapInputCallback, visitedObjects) {
                                visitedObjects = visitedObjects || new objectLookup();
                        
                                rootObject = mapInputCallback(rootObject);
                                var canHaveProperties = (typeof rootObject == "object") && (rootObject !== null) && (rootObject !== undefined) && (!(rootObject instanceof Date)) && (!(rootObject instanceof String)) && (!(rootObject instanceof Number)) && (!(rootObject instanceof Boolean));
                        Severity: Minor
                        Found in www/js/bundle.js - About 1 hr to fix

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

                              function topologicalSortBindings(bindings) {
                                  // Depth-first sort
                                  var result = [],                // The list of key/handler pairs that we will return
                                      bindingsConsidered = {},    // A temporary record of which bindings are already in 'result'
                                      cyclicDependencyStack = []; // Keeps track of a depth-search so that, if there's a cycle, we know which bindings caused it
                          Severity: Minor
                          Found in www/js/bundle.js - About 1 hr to fix

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

                              function _removeBlobs(obj, curKey, containingObject) {
                                if (!obj) return obj;
                            
                                // convert any blob
                                if ((global.Blob && obj instanceof Blob) ||
                            Severity: Minor
                            Found in www/js/bundle.js - About 1 hr to fix

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

                                  save: function(data, path, callback) {
                                    data = normalizeData(data);
                              
                                    switch (typeof path) {
                                      case 'function':
                              Severity: Minor
                              Found in www/js/qr-js/qr.js - About 1 hr to fix

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

                                Decoder.prototype.add = function(obj) {
                                  var packet;
                                  if ('string' == typeof obj) {
                                    packet = decodeString(obj);
                                    if (exports.BINARY_EVENT == packet.type || exports.BINARY_ACK == packet.type) { // binary packet's json
                                Severity: Minor
                                Found in www/js/bundle.js - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                          if (status) {
                                              status.agents = status.agents || [];
                                              this.logs((status.logs || []).map(function(log) {
                                                  return new Msg(log);
                                              }));
                                  Severity: Major
                                  Found in www/js/bundle.js - About 1 hr to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                            if (build && build.conf) {
                                                var conf = build.conf;
                                                this.conf = conf;
                                                this.name(conf.name);
                                                this.platform(conf.platform);
                                    Severity: Major
                                    Found in www/js/bundle.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language