appsflare/ludicrum-api

View on GitHub

Showing 35 of 78 total issues

File socket.io.js has 1660 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*! Socket.IO.js build:0.9.16, development. Copyright(c) 2011 LearnBoost <dev@learnboost.com> MIT Licensed */

var io = ('undefined' === typeof module ? {} : module.exports);
(function () {

Severity: Major
Found in assets/js/socket.io.js - About 4 days to fix

    Function exports has 194 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = function(grunt) {
    
        grunt.config.set('sails-linker', {
            devJs: {
                options: {
    Severity: Major
    Found in tasks/config/sails-linker.js - About 7 hrs to fix

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

          function str(key, holder) {
      
      // Produce a string from holder[key].
      
            var i,          // The loop counter.
      Severity: Major
      Found in assets/js/socket.io.js - About 2 hrs to fix

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

          perform: function (job, done, context) {
            let fileName = job.data.fileName;
            let retryCounter = job.data.retryCounter || 0;
        
            let _vPath = '';
        Severity: Major
        Found in api/workers/ThumbnailerWorker.js - About 2 hrs to fix

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

              parser.decodePacket = function (data) {
                var pieces = data.match(regexp);
          
                if (!pieces) return {};
          
          
          Severity: Major
          Found in assets/js/socket.io.js - About 2 hrs to fix

            Function reconnect has 61 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                Socket.prototype.reconnect = function () {
                  this.reconnecting = true;
                  this.reconnectionAttempts = 0;
                  this.reconnectionDelay = this.options['reconnection delay'];
            
            
            Severity: Major
            Found in assets/js/socket.io.js - About 2 hrs to fix

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

                  JSONPPolling.prototype.post = function (data) {
                    var self = this
                      , query = io.util.query(
                        this.socket.options.query
                        , 't=' + (+new Date) + '&i=' + this.index
              Severity: Major
              Found in assets/js/socket.io.js - About 2 hrs to fix

                Function onPacket has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    SocketNamespace.prototype.onPacket = function (packet) {
                      var self = this;
                
                      function ack() {
                        self.packet({
                Severity: Major
                Found in assets/js/socket.io.js - About 2 hrs to fix

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

                      Socket.prototype.connect = function (fn) {
                        if (this.connecting) {
                          return this;
                        }
                  
                  
                  Severity: Minor
                  Found in assets/js/socket.io.js - About 2 hrs to fix

                    Function handshake has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        Socket.prototype.handshake = function (fn) {
                          var self = this
                            , options = this.options;
                    
                          function complete(data) {
                    Severity: Minor
                    Found in assets/js/socket.io.js - About 1 hr to fix

                      Function encodePacket has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          parser.encodePacket = function (packet) {
                            var type = indexOf(packets, packet.type)
                              , id = packet.id || ''
                              , endpoint = packet.endpoint || ''
                              , ack = packet.ack
                      Severity: Minor
                      Found in assets/js/socket.io.js - About 1 hr to fix

                        Function exports has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        module.exports = function(grunt) {
                        
                        
                            // Load the include-all library in order to require all of our grunt
                            // configurations and task registrations dynamically.
                        Severity: Minor
                        Found in Gruntfile.js - About 1 hr to fix

                          Function Socket has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function Socket(options) {
                                this.options = {
                                  port: 80
                                  , secure: false
                                  , document: 'document' in global ? document : false
                          Severity: Minor
                          Found in assets/js/socket.io.js - About 1 hr to fix

                            Function get has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                XHRPolling.prototype.get = function () {
                                  if (!this.isOpen) return;
                            
                                  var self = this;
                            
                            
                            Severity: Minor
                            Found in assets/js/socket.io.js - About 1 hr to fix

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

                                  JSON.parse = function (text, reviver) {
                                    // The parse method takes a text and an optional reviver function, and returns
                                    // a JavaScript value if the text is a valid JSON text.
                              
                                    var j;
                              Severity: Minor
                              Found in assets/js/socket.io.js - About 1 hr to fix

                                Function maybeReconnect has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                      function maybeReconnect() {
                                        if (!self.reconnecting) {
                                          return;
                                        }
                                
                                
                                Severity: Minor
                                Found in assets/js/socket.io.js - About 1 hr to fix

                                  Function notFound has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  module.exports = function notFound (data, options) {
                                  
                                    // Get access to `req`, `res`, & `sails`
                                    var req = this.req;
                                    var res = this.res;
                                  Severity: Minor
                                  Found in api/responses/notFound.js - About 1 hr to fix

                                    Function exports has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    module.exports = function (req, res, next) {
                                    
                                      var grantType = req.param('grant_type');
                                      if (!grantType) {
                                        return res.send(400, 'missing grant_type parameter');
                                    Severity: Minor
                                    Found in api/policies/isTrustedClient.js - About 1 hr to fix

                                      Function forbidden has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      module.exports = function forbidden (data, options) {
                                      
                                        // Get access to `req`, `res`, & `sails`
                                        var req = this.req;
                                        var res = this.res;
                                      Severity: Minor
                                      Found in api/responses/forbidden.js - About 1 hr to fix

                                        Function serverError has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        module.exports = function serverError (data, options) {
                                        
                                          // Get access to `req`, `res`, & `sails`
                                          var req = this.req;
                                          var res = this.res;
                                        Severity: Minor
                                        Found in api/responses/serverError.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language