linagora/hublin

View on GitHub

Showing 306 of 306 total issues

Function invitationDialogController has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    $scope,
    $log,
    $mdDialog,
    notificationFactory,
    conferenceAPI,
Severity: Major
Found in frontend/js/modules/invitation/invitation-dialog.controller.js - About 50 mins to fix

    Function localSpeakWhileMuted has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      function localSpeakWhileMuted($log, $rootScope, session, currentConferenceState, speakEventEmitterService, notificationFactory, LOCAL_VIDEO_ID) {
    Severity: Major
    Found in frontend/js/modules/speak/local-speak-while-muted.directive.js - About 50 mins to fix

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

            if (this.usingBundle) {
              sdp += 'a=group:BUNDLE ' + this.transceivers.map(function(t) {
                return t.mid;
              }).join(' ') + '\r\n';
            }
      Severity: Minor
      Found in frontend/js/thirdparty/adapter.js and 1 other location - About 50 mins to fix
      frontend/js/thirdparty/adapter.js on lines 1376..1380

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

      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 (this._config.bundlePolicy !== 'max-compat') {
              sdp += 'a=group:BUNDLE ' + this.transceivers.map(function(t) {
                return t.mid;
              }).join(' ') + '\r\n';
            }
      Severity: Minor
      Found in frontend/js/thirdparty/adapter.js and 1 other location - About 50 mins to fix
      frontend/js/thirdparty/adapter.js on lines 1418..1422

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

      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

        function removeTrackFromStreamAndFireEvent(track, stream) {
          stream.removeTrack(track);
          var e = new Event('removetrack'); // TODO: MediaStreamTrackEvent
          e.track = track;
          stream.dispatchEvent(e);
      Severity: Minor
      Found in frontend/js/thirdparty/adapter.js and 1 other location - About 50 mins to fix
      frontend/js/thirdparty/adapter.js on lines 219..224

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

      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

        function addTrackToStreamAndFireEvent(track, stream) {
          stream.addTrack(track);
          var e = new Event('addtrack'); // TODO: MediaStreamTrackEvent
          e.track = track;
          stream.dispatchEvent(e);
      Severity: Minor
      Found in frontend/js/thirdparty/adapter.js and 1 other location - About 50 mins to fix
      frontend/js/thirdparty/adapter.js on lines 226..231

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

      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

      Avoid deeply nested control flow statements.
      Open

                  for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) {
                    featureNames.push(feature.options.aliases[aliasIdx].toLowerCase());
                  }
      Severity: Major
      Found in frontend/js/thirdparty/modernizr.js - About 45 mins to fix

        Function getConnectionString has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        function getConnectionString(hostname, port, dbname, username, password, connectionOptions) {
        Severity: Minor
        Found in backend/core/db/mongo/index.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                      if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {
                        Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);
                      }
          Severity: Major
          Found in frontend/js/thirdparty/modernizr.js - About 45 mins to fix

            Function _createInterface has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

            Pubsub.prototype._createInterface = function(topic) {
              var self = this;
              return {
                subscribe: function(handler) {
                  if (!self.client) {
            Severity: Minor
            Found in backend/core/pubsub/pubsub.js - About 45 mins 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 validateConnection has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            function validateConnection(hostname, port, dbname, username, password, callback) {
            Severity: Minor
            Found in backend/core/db/mongo/index.js - About 45 mins to fix

              Function conferenceAttendeeVideo has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                function conferenceAttendeeVideo(webRTCService, currentConferenceState, matchmedia, $timeout, drawVideo, LOCAL_VIDEO_ID) {
              Severity: Minor
              Found in frontend/js/modules/conference/conference-attendee-video.directive.js - About 45 mins to fix

                Function scaleToCanvas has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  function scaleToCanvas($interval, $window, cropDimensions, drawAvatarIfVideoMuted, drawHelper, currentConferenceState) {
                Severity: Minor
                Found in frontend/js/modules/utils/scale-to-canvas.directive.js - About 45 mins to fix

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

                        function garbage() {
                          stopAnimation();
                          canvas = {};
                          context = {};
                          mainVideo = {};
                  frontend/js/modules/conference/conference-video.directive.js on lines 22..28

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

                  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

                        conference.getMember(req.conference, req.user, (err, member) => {
                          if (err) {
                            throw new errors.ServerError(err);
                          }
                          if (member) {
                  Severity: Minor
                  Found in backend/webserver/middlewares/conference.js and 1 other location - About 45 mins to fix
                  backend/webserver/middlewares/conference.js on lines 32..42

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

                  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

                        function garbage() {
                          stopAnimation();
                          canvas = {};
                          context = {};
                          mainVideo = {};
                  Severity: Minor
                  Found in frontend/js/modules/conference/conference-video.directive.js and 1 other location - About 45 mins to fix
                  frontend/js/modules/conference/conference-mobile-video.directive.js on lines 21..27

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

                  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

                  Avoid deeply nested control flow statements.
                  Open

                                  if (!streams[remoteMsid.stream]) {
                                    streams[remoteMsid.stream] = new window.MediaStream();
                                    Object.defineProperty(streams[remoteMsid.stream], 'id', {
                                      get: function() {
                                        return remoteMsid.stream;
                  Severity: Major
                  Found in frontend/js/thirdparty/adapter.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                if (this.transceivers[i].mid === candidate.sdpMid) {
                                  sdpMLineIndex = i;
                                  break;
                                }
                    Severity: Major
                    Found in frontend/js/thirdparty/adapter.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                      if (!streams.default) {
                                        streams.default = new window.MediaStream();
                                      }
                      Severity: Major
                      Found in frontend/js/thirdparty/adapter.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                      if (!streams[remoteMsid.stream]) {
                                        streams[remoteMsid.stream] = new window.MediaStream();
                                      }
                        Severity: Major
                        Found in frontend/js/thirdparty/adapter.js - About 45 mins to fix
                          Severity
                          Category
                          Status
                          Source
                          Language