linagora/hublin

View on GitHub

Showing 182 of 306 total issues

File adapter.js has 3764 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.adapter = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  /*
   *  Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
   *
   *  Use of this source code is governed by a BSD-style license
Severity: Major
Found in frontend/js/thirdparty/adapter.js - About 1 wk to fix

    Function 1 has 1373 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.adapter = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
      /*
       *  Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
       *
       *  Use of this source code is governed by a BSD-style license
    Severity: Major
    Found in frontend/js/thirdparty/adapter.js - About 6 days to fix

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

        module.exports = function(window, edgeVersion) {
          var RTCPeerConnection = function(config) {
            var pc = this;
      
            var _eventTarget = document.createDocumentFragment();
      Severity: Major
      Found in frontend/js/thirdparty/adapter.js - About 5 days to fix

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

          },{"./chrome/chrome_shim":5,"./common_shim":7,"./edge/edge_shim":8,"./firefox/firefox_shim":10,"./safari/safari_shim":12,"./utils":13}],5:[function(require,module,exports){
        
          /*
           *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
           *
        Severity: Major
        Found in frontend/js/thirdparty/adapter.js - About 3 days to fix

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

            },{"sdp":2}],2:[function(require,module,exports){
             /* eslint-env node */
            'use strict';
          
            // SDP helpers.
          Severity: Major
          Found in frontend/js/thirdparty/adapter.js - About 2 days to fix

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

            module.exports = function(grunt) {
              var testArgs = (function() {
                var opts = ['test', 'chunk'];
                var args = {};
                opts.forEach(function(optName) {
            Severity: Major
            Found in Gruntfile.js - About 1 day to fix

              Function setRemoteDescription has 292 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  RTCPeerConnection.prototype.setRemoteDescription = function(description) {
                    var pc = this;
              
                    if (!isActionAllowedInSignalingState('setRemoteDescription',
                        description.type, this.signalingState) || this._isClosed) {
              Severity: Major
              Found in frontend/js/thirdparty/adapter.js - About 1 day to fix

                Function 12 has 266 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  },{"../utils":13}],12:[function(require,module,exports){
                  /*
                   *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
                   *
                   *  Use of this source code is governed by a BSD-style license
                Severity: Major
                Found in frontend/js/thirdparty/adapter.js - About 1 day to fix

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

                  module.exports = dependencies => {
                    const logger = dependencies('logger');
                    const errors = require('../errors')(dependencies);
                  
                    /**
                  Severity: Major
                  Found in backend/webserver/middlewares/conference.js - About 1 day to fix

                    Function 6 has 209 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      },{"../utils.js":13,"./getusermedia":6}],6:[function(require,module,exports){
                      /*
                       *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
                       *
                       *  Use of this source code is governed by a BSD-style license
                    Severity: Major
                    Found in frontend/js/thirdparty/adapter.js - About 1 day to fix

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

                        module.exports = function(window) {
                          var browserDetails = utils.detectBrowser(window);
                          var navigator = window && window.navigator;
                      
                          var constraintsToChrome_ = function(c) {
                      Severity: Major
                      Found in frontend/js/thirdparty/adapter.js - About 1 day to fix

                        Function shimAddTrackRemoveTrack has 199 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            shimAddTrackRemoveTrack: function(window) {
                              var browserDetails = utils.detectBrowser(window);
                              // shim addTrack and removeTrack.
                              if (window.RTCPeerConnection.prototype.addTrack &&
                                  browserDetails.version >= 65) {
                        Severity: Major
                        Found in frontend/js/thirdparty/adapter.js - About 7 hrs to fix

                          Function 11 has 183 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            },{"../utils":13,"./getusermedia":11}],11:[function(require,module,exports){
                            /*
                             *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
                             *
                             *  Use of this source code is governed by a BSD-style license
                          Severity: Major
                          Found in frontend/js/thirdparty/adapter.js - About 7 hrs to fix

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

                              },{}],10:[function(require,module,exports){
                              /*
                               *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
                               *
                               *  Use of this source code is governed by a BSD-style license
                            Severity: Major
                            Found in frontend/js/thirdparty/adapter.js - About 7 hrs to fix

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

                                module.exports = function(window) {
                                  var browserDetails = utils.detectBrowser(window);
                                  var navigator = window && window.navigator;
                                  var MediaStreamTrack = window && window.MediaStreamTrack;
                              
                              
                              Severity: Major
                              Found in frontend/js/thirdparty/adapter.js - About 7 hrs to fix

                                Function start has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function start(callback) {
                                  function listenCallback(server, err) {
                                    if (server === webserver.server) { states.http4 = STARTED; }
                                    if (server === webserver.sslserver) { states.ssl4 = STARTED; }
                                    if (server === webserver.server6) { states.http6 = STARTED; }
                                Severity: Minor
                                Found in backend/webserver/index.js - About 6 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

                                File services.js has 440 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                'use strict';
                                
                                angular.module('op.websocket')
                                  .factory('IoAction', ['$timeout', function($timeout) {
                                    function getNgCallback(callback) {
                                Severity: Minor
                                Found in frontend/js/modules/websocket/services.js - About 6 hrs to fix

                                  Function shimPeerConnection has 157 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      shimPeerConnection: function(window) {
                                        var browserDetails = utils.detectBrowser(window);
                                  
                                        // The RTCPeerConnection object.
                                        if (!window.RTCPeerConnection) {
                                  Severity: Major
                                  Found in frontend/js/thirdparty/adapter.js - About 6 hrs to fix

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

                                    'use strict';
                                    
                                    const extend = require('extend');
                                    const q = require('q');
                                    const async = require('async');
                                    Severity: Minor
                                    Found in backend/core/conference/index.js - About 6 hrs to fix

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

                                      module.exports = function(dependencies) {
                                        var logger = dependencies('logger');
                                        var errors = require('../errors')(dependencies);
                                        const denormalizer = require('../denormalizers/conference')(dependencies);
                                      
                                      
                                      Severity: Major
                                      Found in backend/webserver/controllers/conferences.js - About 5 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language