socketstream/socketstream

View on GitHub

Showing 206 of 270 total issues

File client.js has 2620 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function webpackUniversalModuleDefinition(root, factory) {
    if(typeof exports === 'object' && typeof module === 'object')
        module.exports = factory();
    else if(typeof define === 'function' && define.amd)
        define([], factory);
Severity: Major
Found in lib/websocket/transports/engineio/client.js - About 1 wk to fix

    Function exports has a Cognitive Complexity of 123 (exceeds 5 allowed). Consider refactoring.
    Open

    module.exports = function(ss,options) {
    
      var proto = require('./proto')(ss, bundlers, bundlerById, options),
          compressor = uglifyjs.Compressor({warnings:false});
    
    
    Severity: Minor
    Found in lib/client/bundler/index.js - About 2 days 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

    File google-code-prettify.js has 934 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // Copyright (C) 2006 Google Inc.
    //
    // Licensed under the Apache License, Version 2.0 (the "License");
    // you may not use this file except in compliance with the License.
    // You may obtain a copy of the License at
    Severity: Major
    Found in docs/js/google-code-prettify.js - About 2 days to fix

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

      module.exports = function(ss,options) {
      
        var proto = require('./proto')(ss, bundlers, bundlerById, options),
            compressor = uglifyjs.Compressor({warnings:false});
      
      
      Severity: Major
      Found in lib/client/bundler/index.js - About 1 day to fix

        File marked.js has 815 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * marked - a markdown parser
         * Copyright (c) 2011-2013, Christopher Jeffrey. (MIT Licensed)
         * https://github.com/chjj/marked
         */
        Severity: Major
        Found in docs/js/marked.js - About 1 day to fix

          Function exports has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring.
          Open

          module.exports = function(ss, bundlers, bundlerById, options) {
          
            return {
              /**
               * @ngdoc method
          Severity: Minor
          Found in lib/client/bundler/proto.js - About 1 day 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 DocsController has 230 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          docsApp.controller.DocsController = function($scope, $location, $window, sections) {
            var INDEX_PATH = /^(\/|\/index[^\.]*.html)$/,
                GLOBALS = /^angular\.([^\.]+)$/,
                MODULE = /^([^\.]+)$/,
                MODULE_MOCK = /^angular\.mock\.([^\.]+)$/,
          Severity: Major
          Found in docs/js/docs.js - About 1 day to fix

            Function DocsController has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
            Open

            docsApp.controller.DocsController = function($scope, $location, $window, sections) {
              var INDEX_PATH = /^(\/|\/index[^\.]*.html)$/,
                  GLOBALS = /^angular\.([^\.]+)$/,
                  MODULE = /^([^\.]+)$/,
                  MODULE_MOCK = /^angular\.mock\.([^\.]+)$/,
            Severity: Minor
            Found in docs/js/docs.js - About 1 day 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

            File docs-setup.js has 526 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            NG_DOCS={
              "sections": {
                "tutorials": "Tutorials",
                "api": "API Documentation",
                "demos": "Demos"
            Severity: Major
            Found in docs/js/docs-setup.js - About 1 day to fix

              Function token has 213 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              Lexer.prototype.token = function(src, top) {
                var src = src.replace(/^ +$/gm, '')
                  , next
                  , loose
                  , cap
              Severity: Major
              Found in docs/js/marked.js - About 1 day to fix

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

                module.exports = function(ss, bundlers, bundlerById, options) {
                
                  return {
                    /**
                     * @ngdoc method
                Severity: Major
                Found in lib/client/bundler/proto.js - About 7 hrs to fix

                  Function combinePrefixPatterns has 186 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function combinePrefixPatterns(regexs) {
                      var capturedGroupIndex = 0;
                    
                      var needToFoldCase = false;
                      var ignoreCase = false;
                  Severity: Major
                  Found in docs/js/google-code-prettify.js - About 7 hrs to fix

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

                    module.exports = function(grunt) {
                        'use strict';
                    
                        var sh = require('shelljs');
                    
                    
                    Severity: Major
                    Found in Gruntfile.js - About 6 hrs to fix

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

                      var docsApp = {
                        controller: {},
                        directive: {},
                        serviceFactory: {}
                      };
                      Severity: Minor
                      Found in docs/js/docs.js - About 6 hrs to fix

                        File index.js has 424 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        // Client-Side Bundler of assets in development and production
                        'use strict';
                        
                        var fs = require('fs'),
                            path = require('path'),
                        Severity: Minor
                        Found in lib/client/bundler/index.js - About 6 hrs to fix

                          Function generate has 146 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          exports.generate = function(program) {
                          
                            var appjs,
                                codeExtension = program.coffee && 'coffee' || 'js',
                                selectedFormatters = [],
                          Severity: Major
                          Found in lib/cli/generate.js - About 5 hrs to fix

                            Function tabbable has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
                            Open

                            directive.tabbable = function() {
                              return {
                                restrict: 'C',
                                compile: function(element) {
                                  var navTabs = angular.element('<ul class="nav nav-tabs"></ul>'),
                            Severity: Minor
                            Found in docs/js/angular-bootstrap.js - About 5 hrs 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 exports has 140 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            module.exports = function(ss) {
                              // make bundler methods available for default and other implementations
                              ss.bundler = require('./bundler/index')(ss,options);
                            
                              // extend http response API
                            Severity: Major
                            Found in lib/client/index.js - About 5 hrs to fix

                              Function exports has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
                              Open

                              module.exports = function(ss,options) {
                                var mods = [];
                              
                                // Set the Default Engine - simply wraps each template in a <script> tag
                                var defaultEngine = require('./template_engines/default')(ss.root,null,options);
                              Severity: Minor
                              Found in lib/client/template_engine.js - About 5 hrs 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 tok has 129 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              Parser.prototype.tok = function() {
                                switch (this.token.type) {
                                  case 'space': {
                                    return '';
                                  }
                              Severity: Major
                              Found in docs/js/marked.js - About 5 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language