linagora/hublin

View on GitHub

Showing 306 of 306 total issues

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

    function link(scope, element, attrs) {
      var unregisterRootScopeListener,
          source = angular.element(attrs.from),
          toPreserve = angular.element(attrs.preserve);

Severity: Minor
Found in frontend/js/modules/utils/smart-fit.directive.js - About 1 hr to fix

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

        function link(scope, element) {
          var widgets = [];
          var toggleAnim = false;
          var stopScaling = false;
    
    
    Severity: Minor
    Found in frontend/js/modules/utils/scale-to-canvas.directive.js - About 1 hr to fix

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

        function wrapPeerConnectionEvent(window, eventNameToWrap, wrapper) {
          if (!window.RTCPeerConnection) {
            return;
          }
          var proto = window.RTCPeerConnection.prototype;
      Severity: Minor
      Found in frontend/js/thirdparty/adapter.js - About 1 hr to fix

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

            if (transceiver.rtpSender && transceiver.sendEncodingParameters[0].rtx) {
              sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].rtx.ssrc +
                  ' cname:' + SDPUtils.localCName + '\r\n';
            }
        Severity: Major
        Found in frontend/js/thirdparty/adapter.js and 1 other location - About 1 hr to fix
        frontend/js/thirdparty/adapter.js on lines 59..62

        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 70.

        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

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

            if (transceiver.rtpSender && transceiver.sendEncodingParameters[0].rtx) {
              sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].rtx.ssrc +
                  ' cname:' + SDPUtils.localCName + '\r\n';
            }
        Severity: Major
        Found in frontend/js/thirdparty/adapter.js and 1 other location - About 1 hr to fix
        frontend/js/thirdparty/adapter.js on lines 2253..2256

        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 70.

        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

        Function onlocalcandidate has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              iceGatherer.onlocalcandidate = function(evt) {
                if (pc.usingBundle && sdpMLineIndex > 0) {
                  // if we know that we use bundle we can drop candidates with
                  // Ñ•dpMLineIndex > 0. If we don't do this then our state gets
                  // confused since we dispose the extra ice gatherer.
        Severity: Minor
        Found in frontend/js/thirdparty/adapter.js - About 1 hr to fix

          Function detectBrowser has 43 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              detectBrowser: function(window) {
                var navigator = window && window.navigator;
          
                // Returned result object.
                var result = {};
          Severity: Minor
          Found in frontend/js/thirdparty/adapter.js - About 1 hr to fix

            Function shimCreateObjectURL has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                shimCreateObjectURL: function(window) {
                  var URL = window && window.URL;
            
                  if (!(typeof window === 'object' && window.HTMLMediaElement &&
                        'srcObject' in window.HTMLMediaElement.prototype &&
            Severity: Minor
            Found in frontend/js/thirdparty/adapter.js - About 1 hr to fix

              Consider simplifying this complex logical expression.
              Open

                    if (server && (server.urls || server.url)) {
                      var urls = server.urls || server.url;
                      if (server.url && !server.urls) {
                        console.warn('RTCIceServer.url is deprecated! Use urls instead.');
                      }
              Severity: Critical
              Found in frontend/js/thirdparty/adapter.js - About 1 hr to fix

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

                  function injectElementWithStyles(rule, callback, nodes, testnames) {
                    var mod = 'modernizr';
                    var style;
                    var ret;
                    var node;
                Severity: Minor
                Found in frontend/js/thirdparty/modernizr.js - About 1 hr to fix

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

                    function init(io) {
                      if (initialized) {
                        logger.warn('The notification conferences service is already initialized');
                        return;
                      }
                  Severity: Minor
                  Found in backend/wsserver/notification/conference.js - About 1 hr to fix

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

                        shimPeerConnection: function(window) {
                          var browserDetails = utils.detectBrowser(window);
                    
                          if (window.RTCIceGatherer) {
                            // ORTC defines an RTCIceCandidate object but no constructor.
                    Severity: Minor
                    Found in frontend/js/thirdparty/adapter.js - About 1 hr to fix

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

                            var constraintsToFF37_ = function(c) {
                              if (typeof c !== 'object' || c.require) {
                                return c;
                              }
                              var require = [];
                      Severity: Minor
                      Found in frontend/js/thirdparty/adapter.js - About 1 hr to fix

                        Function writeMediaSection has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          SDPUtils.writeMediaSection = function(transceiver, caps, type, stream) {
                            var sdp = SDPUtils.writeRtpDescription(transceiver.kind, caps);
                        
                            // Map ICE parameters (ufrag, pwd) to SDP.
                            sdp += SDPUtils.writeIceParameters(
                        Severity: Minor
                        Found in frontend/js/thirdparty/adapter.js - About 1 hr to fix

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

                          module.exports = function(dependencies) {
                            'use strict';
                          
                            var logger = dependencies('logger');
                          
                          
                          Severity: Minor
                          Found in backend/webserver/errors.js - About 1 hr to fix

                            Function addTrack has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                  window.RTCPeerConnection.prototype.addTrack = function(track, stream) {
                                    var pc = this;
                                    if (pc.signalingState === 'closed') {
                                      throw new DOMException(
                                        'The RTCPeerConnection\'s signalingState is \'closed\'.',
                            Severity: Minor
                            Found in frontend/js/thirdparty/adapter.js - About 1 hr to fix

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

                                if (states.ssl6 === STOPPED) {
                                  webserver.sslserver6 = https.createServer(sslopts, webserver.application).listen(webserver.ssl_port, webserver.ssl_ipv6);
                                  setupEventListeners(webserver.sslserver6);
                                }
                              Severity: Major
                              Found in backend/webserver/index.js and 1 other location - About 1 hr to fix
                              backend/webserver/index.js on lines 160..163

                              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 67.

                              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

                                    withCallback = function(description, successCallback, failureCallback) {
                                      var promise = setRemoteDescription.apply(this, [description]);
                                      if (!failureCallback) {
                                        return promise;
                                      }
                              Severity: Major
                              Found in frontend/js/thirdparty/adapter.js and 1 other location - About 1 hr to fix
                              frontend/js/thirdparty/adapter.js on lines 4341..4348

                              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 67.

                              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

                                    withCallback = function(candidate, successCallback, failureCallback) {
                                      var promise = addIceCandidate.apply(this, [candidate]);
                                      if (!failureCallback) {
                                        return promise;
                                      }
                              Severity: Major
                              Found in frontend/js/thirdparty/adapter.js and 1 other location - About 1 hr to fix
                              frontend/js/thirdparty/adapter.js on lines 4331..4338

                              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 67.

                              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 (!isActionAllowedInSignalingState('setRemoteDescription',
                                        description.type, this.signalingState) || this._isClosed) {
                                      return Promise.reject(makeError('InvalidStateError',
                                          'Can not set remote ' + description.type +
                                          ' in state ' + pc.signalingState));
                              Severity: Major
                              Found in frontend/js/thirdparty/adapter.js and 1 other location - About 1 hr to fix
                              frontend/js/thirdparty/adapter.js on lines 730..735

                              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 67.

                              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

                              Severity
                              Category
                              Status
                              Source
                              Language