linagora/hublin

View on GitHub

Showing 182 of 306 total issues

Function 7 has 130 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  },{"../utils.js":13}],7:[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 5 hrs to fix

    File modernizr.js has 383 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * modernizr v3.5.0
     * Build https://modernizr.com/download?-datachannel-getusermedia-peerconnection-websockets-domprefixes-setclasses-dontmin
     *
     * Copyright (c)
    Severity: Minor
    Found in frontend/js/thirdparty/modernizr.js - About 5 hrs to fix

      Function createOffer has 127 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          RTCPeerConnection.prototype.createOffer = function() {
            var pc = this;
      
            if (this._isClosed) {
              return Promise.reject(makeError('InvalidStateError',
      Severity: Major
      Found in frontend/js/thirdparty/adapter.js - About 5 hrs to fix

        Function ConferenceState has 116 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function ConferenceState($rootScope, LOCAL_VIDEO_ID, REMOTE_VIDEO_IDS, newImage) {
            /*
            * Store a snapshot of current conference status and an array of attendees describing
            * current visible attendees of the conference by their index as position.
            * attendees : [{
        Severity: Major
        Found in frontend/js/modules/conference/conference-state.service.js - About 4 hrs to fix

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

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

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

            module.exports = function(dependencies) {
              var logger = dependencies('logger');
              var errors = require('../errors')(dependencies);
              const denormalizer = require('../denormalizers/conference')(dependencies);
            
            
            Severity: Minor
            Found in backend/webserver/controllers/conferences.js - About 4 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 start has 105 lines of code (exceeds 25 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: Major
            Found in backend/webserver/index.js - About 4 hrs to fix

              Function 4 has 97 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                },{"./adapter_factory.js":4}],4:[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 3 hrs to fix

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

                  module.exports = function(dependencies, opts) {
                    var window = dependencies && dependencies.window;
                
                    var options = {
                      shimChrome: true,
                Severity: Major
                Found in frontend/js/thirdparty/adapter.js - About 3 hrs to fix

                  Function shimGetSendersWithDtmf has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      shimGetSendersWithDtmf: function(window) {
                        // Overrides addTrack/removeTrack, depends on shimAddTrackRemoveTrack.
                        if (typeof window === 'object' && window.RTCPeerConnection &&
                            !('getSenders' in window.RTCPeerConnection.prototype) &&
                            'createDTMFSender' in window.RTCPeerConnection.prototype) {
                  Severity: Major
                  Found in frontend/js/thirdparty/adapter.js - About 3 hrs to fix

                    File Gruntfile.js has 319 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    'use strict';
                    
                    var fs = require('fs-extra');
                    var path = require('path');
                    var conf_path = './test/config/';
                    Severity: Minor
                    Found in Gruntfile.js - About 3 hrs to fix

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

                        },{"../utils":13}],13:[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 3 hrs to fix

                        Function liveConference has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          function liveConference(
                            $log,
                            $timeout,
                            $interval,
                            session,
                        Severity: Major
                        Found in frontend/js/modules/live-conference/live-conference.directive.js - About 3 hrs to fix

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

                            function conferenceVideo($timeout, $window, $rootScope, drawVideo, currentConferenceState, LOCAL_VIDEO_ID, DEFAULT_AVATAR_SIZE, $state) {
                              return {
                                restrict: 'E',
                                replace: true,
                                templateUrl: '/views/modules/conference/conference-video.html',
                          Severity: Major
                          Found in frontend/js/modules/conference/conference-video.directive.js - About 3 hrs to fix

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

                            module.exports = function(dependencies) {
                            
                              var logger = dependencies('logger');
                              var errors = require('../errors')(dependencies);
                            
                            
                            Severity: Major
                            Found in backend/webserver/middlewares/user.js - About 3 hrs to fix

                              Function setLocalDescription has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

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

                                Function shimLocalStreamsAPI has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    shimLocalStreamsAPI: function(window) {
                                      if (typeof window !== 'object' || !window.RTCPeerConnection) {
                                        return;
                                      }
                                      if (!('getLocalStreams' in window.RTCPeerConnection.prototype)) {
                                Severity: Major
                                Found in frontend/js/thirdparty/adapter.js - About 3 hrs to fix

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

                                      function controller($scope) {
                                        $scope.conference = session.conference;
                                        $scope.conferenceState = currentConferenceState;
                                        $scope.conferenceId = $scope.conference._id;
                                        $scope.reportedAttendee = null;
                                  Severity: Major
                                  Found in frontend/js/modules/live-conference/live-conference.directive.js - About 2 hrs to fix

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

                                    module.exports = function(dependencies) {
                                    
                                      var logger = dependencies('logger'),
                                          errors = require('../errors')(dependencies),
                                          config = dependencies('config')('default');
                                    Severity: Major
                                    Found in backend/webserver/controllers/home.js - About 2 hrs to fix

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

                                          function link(scope, element) {
                                            var canvas = {};
                                            var context = {};
                                            var mainVideo = {};
                                            var currentVideoId = LOCAL_VIDEO_ID;
                                      Severity: Major
                                      Found in frontend/js/modules/conference/conference-video.directive.js - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language