nutella-framework/nutella_framework

View on GitHub

Showing 96 of 196 total issues

File nutella_lib.js has 2793 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.NUTELLA = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/******************
 * nutella_lib.js *
 ******************/

Severity: Major
Found in framework_components/room-debugger/js/nutella_lib.js - About 1 wk to fix

Function 15 has 1340 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"./paho/mqttws31":15}],15:[function(require,module,exports){
/*******************************************************************************
 * Copyright (c) 2013 IBM Corp.
 *
 * All rights reserved. This program and the accompanying materials
Severity: Major
Found in framework_components/room-debugger/js/nutella_lib.js - About 6 days to fix

Function MQTT has 1334 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Paho.MQTT = (function (global) {

    // Private variables below, these are only visible inside the function closure
    // which is used to define the module. 

Severity: Major
Found in framework_components/room-debugger/js/nutella_lib.js - About 6 days to fix

File bootstrap.js has 1548 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * Bootstrap v3.3.4 (http://getbootstrap.com)
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */
Severity: Major
Found in framework_components/room-debugger/js/bootstrap.js - About 4 days to fix

Function 2 has 343 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"./nutella_i_browser":9,"./version":17}],2:[function(require,module,exports){
/*jshint bitwise:false*/
/*global unescape*/

(function (factory) {
Severity: Major
Found in framework_components/room-debugger/js/nutella_lib.js - About 1 day to fix

Function 10 has 230 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"./app_core_browser":3,"./fr_core_browser":6,"./run_location":10,"./run_log":11,"./run_net":12,"./simple-mqtt-client/client-browser":14}],10:[function(require,module,exports){
var LocationSubModule = function(main_nutella) {
    this.nutella = main_nutella;

    this._resources = {};
Severity: Major
Found in framework_components/room-debugger/js/nutella_lib.js - About 1 day to fix

Function Client has 221 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var Client = function (host, port, path, clientId) {
        
        var uri;
        
        if (typeof host !== "string")
Severity: Major
Found in framework_components/room-debugger/js/nutella_lib.js - About 1 day to fix

Function 8 has 169 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"./app_net":5}],8:[function(require,module,exports){
/**
 * Framework-level Networking APIs for nutella
 */

Severity: Major
Found in framework_components/room-debugger/js/nutella_lib.js - About 6 hrs to fix

Function 16 has 153 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{}],16:[function(require,module,exports){
/**
 * Network APIs abstraction
 */

Severity: Major
Found in framework_components/room-debugger/js/nutella_lib.js - About 6 hrs to fix

Function 14 has 139 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"spark-md5":2}],14:[function(require,module,exports){
/**********************
 * Simple MQTT client *
 **********************/

Severity: Major
Found in framework_components/room-debugger/js/nutella_lib.js - About 5 hrs to fix

Function encode has 133 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    WireMessage.prototype.encode = function() {
        // Compute the first byte of the fixed header
        var first = ((this.type & 0x0f) << 4);
        
        /*
Severity: Major
Found in framework_components/room-debugger/js/nutella_lib.js - About 5 hrs to fix

Function _handleMessage has 123 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    ClientImpl.prototype._handleMessage = function(wireMessage) {
        
        this._trace("Client._handleMessage", wireMessage);

        try {
Severity: Major
Found in framework_components/room-debugger/js/nutella_lib.js - About 4 hrs to fix

Function generateVirtualResource has 115 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function generateVirtualResource(resource) {
    var virtualResource = {};
    Object.defineProperty(virtualResource, 'rid', {
        get: function() {
            return resource.rid;
Severity: Major
Found in framework_components/room-debugger/js/nutella_lib.js - About 4 hrs to fix

Function 5 has 92 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"./app_net":5}],5:[function(require,module,exports){
/**
 * App-level Networking APIs for nutella
 */

Severity: Major
Found in framework_components/room-debugger/js/nutella_lib.js - About 3 hrs to fix

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

        this.connect = function (connectOptions) {
            connectOptions = connectOptions || {} ;
            validate(connectOptions,  {timeout:"number",
                                       userName:"string", 
                                       password:"string", 
Severity: Major
Found in framework_components/room-debugger/js/nutella_lib.js - About 3 hrs to fix

Function md5cycle has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    md5cycle = function (x, k) {
        var a = x[0],
            b = x[1],
            c = x[2],
            d = x[3];
Severity: Major
Found in framework_components/room-debugger/js/nutella_lib.js - About 2 hrs to fix

Function 13 has 70 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"./run_net_bin":13,"./util/net":16}],13:[function(require,module,exports){
/**
 * Run-level binary network APIs for nutella
 */

Severity: Major
Found in framework_components/room-debugger/js/nutella_lib.js - About 2 hrs to fix

Function 9 has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"./util/net":16}],9:[function(require,module,exports){
/**
 * Run-level and App-level Nutella instances for the browser
 */

Severity: Major
Found in framework_components/room-debugger/js/nutella_lib.js - About 2 hrs to fix

Function decodeMessage has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function decodeMessage(input,pos) {
        var startingPos = pos;
        var first = input[pos];
        var type = first >> 4;
        var messageInfo = first &= 0x0f;
Severity: Major
Found in framework_components/room-debugger/js/nutella_lib.js - About 2 hrs to fix

Function Message has 59 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var Message = function (newPayload) {  
        var payload;
        if (   typeof newPayload === "string" 
            || newPayload instanceof ArrayBuffer
            || newPayload instanceof Int8Array
Severity: Major
Found in framework_components/room-debugger/js/nutella_lib.js - About 2 hrs to fix
Severity
Category
Status
Source
Language