socketio/socket.io

View on GitHub
client-dist/socket.io.js

Summary

Maintainability
F
3 wks
Test Coverage

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

/*!
 * Socket.IO v4.4.1
 * (c) 2014-2022 Guillermo Rauch
 * Released under the MIT License.
 */
Severity: Major
Found in client-dist/socket.io.js - About 1 wk to fix

    Function Socket$1 has 404 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      var Socket$1 = /*#__PURE__*/function (_Emitter) {
        _inherits(Socket, _Emitter);
    
        var _super = _createSuper(Socket);
    
    
    Severity: Major
    Found in client-dist/socket.io.js - About 2 days to fix

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

        var Socket = /*#__PURE__*/function (_Emitter) {
          _inherits(Socket, _Emitter);
      
          var _super = _createSuper(Socket);
      
      
      Severity: Major
      Found in client-dist/socket.io.js - About 1 day to fix

        Function Manager has 280 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          var Manager = /*#__PURE__*/function (_Emitter) {
            _inherits(Manager, _Emitter);
        
            var _super = _createSuper(Manager);
        
        
        Severity: Major
        Found in client-dist/socket.io.js - About 1 day to fix

          Function Polling has 124 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            var Polling = /*#__PURE__*/function (_Transport) {
              _inherits(Polling, _Transport);
          
              var _super = _createSuper(Polling);
          
          
          Severity: Major
          Found in client-dist/socket.io.js - About 4 hrs to fix

            Function Request has 120 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              var Request = /*#__PURE__*/function (_Emitter) {
                _inherits(Request, _Emitter);
            
                var _super2 = _createSuper(Request);
            
            
            Severity: Major
            Found in client-dist/socket.io.js - About 4 hrs to fix

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

                var Decoder = /*#__PURE__*/function (_Emitter) {
                  _inherits(Decoder, _Emitter);
              
                  var _super = _createSuper(Decoder);
              
              
              Severity: Major
              Found in client-dist/socket.io.js - About 4 hrs to fix

                Function WS has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  var WS = /*#__PURE__*/function (_Transport) {
                    _inherits(WS, _Transport);
                
                    var _super = _createSuper(WS);
                
                
                Severity: Major
                Found in client-dist/socket.io.js - About 4 hrs to fix

                  Function probe has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        value: function probe(name) {
                          var _this4 = this;
                  
                          var transport = this.createTransport(name);
                          var failed = false;
                  Severity: Major
                  Found in client-dist/socket.io.js - About 2 hrs to fix

                    Function Transport has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      var Transport = /*#__PURE__*/function (_Emitter) {
                        _inherits(Transport, _Emitter);
                    
                        var _super = _createSuper(Transport);
                    
                    
                    Severity: Major
                    Found in client-dist/socket.io.js - About 2 hrs to fix

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

                          function Socket(uri) {
                            var _this;
                      
                            var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
                      
                      
                      Severity: Major
                      Found in client-dist/socket.io.js - About 2 hrs to fix

                        Function XHR has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          var XHR = /*#__PURE__*/function (_Polling) {
                            _inherits(XHR, _Polling);
                        
                            var _super = _createSuper(XHR);
                        
                        
                        Severity: Major
                        Found in client-dist/socket.io.js - About 2 hrs to fix

                          Function create has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                value: function create() {
                                  var _this5 = this;
                          
                                  var opts = pick(this.opts, "agent", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "autoUnref");
                                  opts.xdomain = !!this.opts.xd;
                          Severity: Major
                          Found in client-dist/socket.io.js - About 2 hrs to fix

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

                                  value: function decodeString(str) {
                                    var i = 0; // look up type
                            
                                    var p = {
                                      type: Number(str.charAt(0))
                            Severity: Minor
                            Found in client-dist/socket.io.js - About 1 hr to fix

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

                                function _createForOfIteratorHelper(o, allowArrayLike) {
                                  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
                              
                                  if (!it) {
                                    if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
                              Severity: Minor
                              Found in client-dist/socket.io.js - About 1 hr to fix

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

                                  var Encoder = /*#__PURE__*/function () {
                                    function Encoder() {
                                      _classCallCheck(this, Encoder);
                                    }
                                
                                
                                Severity: Minor
                                Found in client-dist/socket.io.js - About 1 hr to fix

                                  Function open has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                        value: function open(fn) {
                                          var _this2 = this;
                                  
                                          if (~this._readyState.indexOf("open")) return this;
                                          this.engine = new Socket$1(this.uri, this.opts);
                                  Severity: Minor
                                  Found in client-dist/socket.io.js - About 1 hr to fix

                                    Function url has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      function url(uri) {
                                        var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
                                        var loc = arguments.length > 2 ? arguments[2] : undefined;
                                        var obj = uri; // default to window.location
                                    
                                    
                                    Severity: Minor
                                    Found in client-dist/socket.io.js - About 1 hr to fix

                                      Function onpacket has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                            value: function onpacket(packet) {
                                              var sameNamespace = packet.nsp === this.nsp;
                                              if (!sameNamespace) return;
                                      
                                              switch (packet.type) {
                                      Severity: Minor
                                      Found in client-dist/socket.io.js - About 1 hr to fix

                                        Function Manager has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            function Manager(uri, opts) {
                                              var _this;
                                        
                                              _classCallCheck(this, Manager);
                                        
                                        
                                        Severity: Minor
                                        Found in client-dist/socket.io.js - About 1 hr to fix

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

                                                  var onTransportOpen = function onTransportOpen() {
                                                    if (failed) return;
                                                    transport.send([{
                                                      type: "ping",
                                                      data: "probe"
                                          Severity: Minor
                                          Found in client-dist/socket.io.js - About 1 hr to fix

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

                                                  value: function reconnect() {
                                                    var _this3 = this;
                                            
                                                    if (this._reconnecting || this.skipReconnect) return this;
                                                    var self = this;
                                            Severity: Minor
                                            Found in client-dist/socket.io.js - About 1 hr to fix

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

                                                    value: function close() {
                                                      var _this6 = this;
                                              
                                                      var close = function close() {
                                                        _this6.onClose("forced close");
                                              Severity: Minor
                                              Found in client-dist/socket.io.js - About 1 hr to fix

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

                                                      value: function emit(ev) {
                                                        if (RESERVED_EVENTS.hasOwnProperty(ev)) {
                                                          throw new Error('"' + ev + '" is a reserved event name');
                                                        }
                                                
                                                
                                                Severity: Minor
                                                Found in client-dist/socket.io.js - About 1 hr to fix

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

                                                    var decode$1 = function decode(base64) {
                                                      var bufferLength = base64.length * 0.75,
                                                          len = base64.length,
                                                          i,
                                                          p = 0,
                                                  Severity: Minor
                                                  Found in client-dist/socket.io.js - About 1 hr to fix

                                                    Avoid too many return statements within this function.
                                                    Open

                                                          return hasBinary(obj.toJSON(), true);
                                                    Severity: Major
                                                    Found in client-dist/socket.io.js - About 30 mins to fix

                                                      Avoid too many return statements within this function.
                                                      Open

                                                          return false;
                                                      Severity: Major
                                                      Found in client-dist/socket.io.js - About 30 mins to fix

                                                        Avoid too many return statements within this function.
                                                        Open

                                                              return false;
                                                        Severity: Major
                                                        Found in client-dist/socket.io.js - About 30 mins to fix

                                                          Avoid too many return statements within this function.
                                                          Open

                                                                  return true;
                                                          Severity: Major
                                                          Found in client-dist/socket.io.js - About 30 mins to fix

                                                            Avoid too many return statements within this function.
                                                            Open

                                                                return callback(PACKET_TYPES[type] + (data || ""));
                                                            Severity: Major
                                                            Found in client-dist/socket.io.js - About 30 mins to fix

                                                              Avoid too many return statements within this function.
                                                              Open

                                                                  return data;
                                                              Severity: Major
                                                              Found in client-dist/socket.io.js - About 30 mins to fix

                                                                Similar blocks of code found in 3 locations. Consider refactoring.
                                                                Open

                                                                    }, {
                                                                      key: "reconnectionDelay",
                                                                      value: function reconnectionDelay(v) {
                                                                        var _a;
                                                                
                                                                
                                                                Severity: Major
                                                                Found in client-dist/socket.io.js and 2 other locations - About 3 hrs to fix
                                                                client-dist/socket.io.js on lines 3822..3832
                                                                client-dist/socket.io.js on lines 3832..3842

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 95.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 3 locations. Consider refactoring.
                                                                Open

                                                                    }, {
                                                                      key: "reconnectionDelayMax",
                                                                      value: function reconnectionDelayMax(v) {
                                                                        var _a;
                                                                
                                                                
                                                                Severity: Major
                                                                Found in client-dist/socket.io.js and 2 other locations - About 3 hrs to fix
                                                                client-dist/socket.io.js on lines 3812..3822
                                                                client-dist/socket.io.js on lines 3822..3832

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 95.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 3 locations. Consider refactoring.
                                                                Open

                                                                    }, {
                                                                      key: "randomizationFactor",
                                                                      value: function randomizationFactor(v) {
                                                                        var _a;
                                                                
                                                                
                                                                Severity: Major
                                                                Found in client-dist/socket.io.js and 2 other locations - About 3 hrs to fix
                                                                client-dist/socket.io.js on lines 3812..3822
                                                                client-dist/socket.io.js on lines 3832..3842

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 95.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                        return schema + "://" + (ipv6 ? "[" + this.opts.hostname + "]" : this.opts.hostname) + port + this.opts.path + (encodedQuery.length ? "?" + encodedQuery : "");
                                                                Severity: Major
                                                                Found in client-dist/socket.io.js and 1 other location - About 2 hrs to fix
                                                                client-dist/socket.io.js on lines 1281..1281

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 75.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                        return schema + "://" + (ipv6 ? "[" + this.opts.hostname + "]" : this.opts.hostname) + port + this.opts.path + (encodedQuery.length ? "?" + encodedQuery : "");
                                                                Severity: Major
                                                                Found in client-dist/socket.io.js and 1 other location - About 2 hrs to fix
                                                                client-dist/socket.io.js on lines 1834..1834

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 75.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                        for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
                                                                          args[_key2 - 1] = arguments[_key2];
                                                                        }
                                                                Severity: Major
                                                                Found in client-dist/socket.io.js and 1 other location - About 1 hr to fix
                                                                client-dist/socket.io.js on lines 422..424

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 74.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                    for (var _len = arguments.length, attr = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
                                                                      attr[_key - 1] = arguments[_key];
                                                                    }
                                                                Severity: Major
                                                                Found in client-dist/socket.io.js and 1 other location - About 1 hr to fix
                                                                client-dist/socket.io.js on lines 3138..3140

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 74.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                        if (this.opts.port && ("wss" === schema && Number(this.opts.port) !== 443 || "ws" === schema && Number(this.opts.port) !== 80)) {
                                                                          port = ":" + this.opts.port;
                                                                        } // append timestamp to URI
                                                                Severity: Major
                                                                Found in client-dist/socket.io.js and 1 other location - About 1 hr to fix
                                                                client-dist/socket.io.js on lines 1275..1277

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 66.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                        if (this.opts.port && ("https" === schema && Number(this.opts.port) !== 443 || "http" === schema && Number(this.opts.port) !== 80)) {
                                                                          port = ":" + this.opts.port;
                                                                        }
                                                                Severity: Major
                                                                Found in client-dist/socket.io.js and 1 other location - About 1 hr to fix
                                                                client-dist/socket.io.js on lines 1818..1820

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 66.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                    }, {
                                                                      key: "prependAny",
                                                                      value: function prependAny(listener) {
                                                                        this._anyListeners = this._anyListeners || [];
                                                                
                                                                
                                                                Severity: Major
                                                                Found in client-dist/socket.io.js and 1 other location - About 1 hr to fix
                                                                client-dist/socket.io.js on lines 3585..3602

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 60.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                    }, {
                                                                      key: "onAny",
                                                                      value: function onAny(listener) {
                                                                        this._anyListeners = this._anyListeners || [];
                                                                
                                                                
                                                                Severity: Major
                                                                Found in client-dist/socket.io.js and 1 other location - About 1 hr to fix
                                                                client-dist/socket.io.js on lines 3602..3618

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 60.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 3 locations. Consider refactoring.
                                                                Open

                                                                          for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
                                                                            args[_key4] = arguments[_key4];
                                                                          }
                                                                Severity: Major
                                                                Found in client-dist/socket.io.js and 2 other locations - About 1 hr to fix
                                                                client-dist/socket.io.js on lines 3115..3117
                                                                client-dist/socket.io.js on lines 3204..3206

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 56.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 3 locations. Consider refactoring.
                                                                Open

                                                                        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
                                                                          args[_key] = arguments[_key];
                                                                        }
                                                                Severity: Major
                                                                Found in client-dist/socket.io.js and 2 other locations - About 1 hr to fix
                                                                client-dist/socket.io.js on lines 3204..3206
                                                                client-dist/socket.io.js on lines 3393..3395

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 56.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 3 locations. Consider refactoring.
                                                                Open

                                                                          for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
                                                                            args[_key3] = arguments[_key3];
                                                                          }
                                                                Severity: Major
                                                                Found in client-dist/socket.io.js and 2 other locations - About 1 hr to fix
                                                                client-dist/socket.io.js on lines 3115..3117
                                                                client-dist/socket.io.js on lines 3393..3395

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 56.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                      for (var key in data) {
                                                                        if (data.hasOwnProperty(key)) {
                                                                          _newData[key] = _deconstructPacket(data[key], buffers);
                                                                        }
                                                                      }
                                                                Severity: Minor
                                                                Found in client-dist/socket.io.js and 1 other location - About 40 mins to fix
                                                                client-dist/socket.io.js on lines 2641..2645

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 48.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                      for (var key in data) {
                                                                        if (data.hasOwnProperty(key)) {
                                                                          data[key] = _reconstructPacket(data[key], buffers);
                                                                        }
                                                                      }
                                                                Severity: Minor
                                                                Found in client-dist/socket.io.js and 1 other location - About 40 mins to fix
                                                                client-dist/socket.io.js on lines 2603..2607

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 48.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                      for (var i = 0; i < data.length; i++) {
                                                                        newData[i] = _deconstructPacket(data[i], buffers);
                                                                      }
                                                                Severity: Minor
                                                                Found in client-dist/socket.io.js and 1 other location - About 35 mins to fix
                                                                client-dist/socket.io.js on lines 2637..2639

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 47.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                      for (var i = 0; i < data.length; i++) {
                                                                        data[i] = _reconstructPacket(data[i], buffers);
                                                                      }
                                                                Severity: Minor
                                                                Found in client-dist/socket.io.js and 1 other location - About 35 mins to fix
                                                                client-dist/socket.io.js on lines 2595..2597

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 47.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                There are no issues that match your filters.

                                                                Category
                                                                Status