linagora/openpaas-esn

View on GitHub

Showing 726 of 2,177 total issues

File contact-api-client.service.spec.js has 1093 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

/* global chai: false */

var expect = chai.expect;

    File time-zone-selector.constants.js has 1057 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    (function() {
      'use strict';
    
      angular.module('esn.datetime')
        .constant('ESN_DATETIME_TIMEZONE', [

      File app.controllers.spec.js has 1005 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      'use strict';
      
      /* global chai: false */
      /* global sinon: false */
      
      
      Severity: Major
      Found in modules/linagora.esn.contact/frontend/app/app.controllers.spec.js - About 2 days to fix

        File message.js has 969 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        'use strict';
        
        angular.module('esn.message')
          .constant('ESN_MESSAGE_TYPES', ['whatsup', 'event', 'poll'])
          .constant('ESN_MESSAGE_DEFAULT_POLL_CHOICES', [{ label: '' }, { label: '' }])
        Severity: Major
        Found in frontend/js/modules/message.js - About 2 days to fix

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

          module.exports = function(collaborationModule) {
            return {
              addMember,
              addMembers,
              addMembershipRequest,
          Severity: Major
          Found in backend/core/collaboration/member/index.js - About 2 days to fix

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

            module.exports = function(dependencies) {
              const logger = dependencies('logger');
              const contactModule = dependencies('contact');
              const proxy = require('../proxy')(dependencies)(PATH);
              const avatarHelper = require('./avatarHelper')(dependencies);

              File addressbook-acl-helper.servive.spec.js has 761 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              'use strict';
              
              /* global chai: false */
              
              var expect = chai.expect;

                File contact-list.controller.spec.js has 745 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                'use strict';
                
                /* global chai: false */
                /* global sinon: false */
                
                

                  Function ContactAPIClient has 338 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function ContactAPIClient(
                      $q,
                      uuid4,
                      AddressbookShell,
                      ContactShell,

                    File contact.service.spec.js has 694 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    'use strict';
                    
                    /* global chai, sinon: false */
                    
                    var expect = chai.expect;

                      File addressbook.service.spec.js has 685 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      'use strict';
                      
                      /* global chai: false */
                      /* global sinon: false */
                      
                      

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

                        module.exports = function(grunt) {
                          // must be run at the top
                          timeGrunt(grunt);
                        
                          var gruntfileUtils = new GruntfileUtils(grunt, servers);
                        Severity: Major
                        Found in Gruntfile.js - About 1 day to fix

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

                          module.exports = function(collaborationModule) {
                            return {
                              addMember,
                              addMembers,
                              addMembershipRequest,
                          Severity: Minor
                          Found in backend/core/collaboration/member/index.js - About 1 day 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 exports has 234 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          module.exports = (dependencies, options = {}) => {
                            const logger = dependencies('logger');
                          
                            const {
                              ESNToken,
                          Severity: Major
                          Found in modules/linagora.esn.contact/backend/lib/client/addressbook.js - About 1 day to fix

                            Function contactAddressbookService has 212 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              function contactAddressbookService(
                                $q,
                                $window,
                                $log,
                                _,

                              Function gracePeriodService has 203 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                function gracePeriodService(
                                  $timeout,
                                  $log,
                                  $q,
                                  _,
                              Severity: Major
                              Found in modules/linagora.esn.graceperiod/frontend/js/grace-period.service.js - About 1 day to fix

                                Function boxOverlayManager has 201 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  function boxOverlayManager(_, $rootScope, $window, $compile, $http, $templateCache, notificationFactory, ESN_BOX_OVERLAY_MAX_WINDOWS) {
                                    var boxTemplateUrl = '/views/modules/box-overlay/box-overlay.html';
                                    var boxes = [];
                                
                                    return {
                                Severity: Major
                                Found in frontend/js/modules/box-overlay/box-overlay-manager.service.js - About 1 day to fix

                                  File core-frontend-injections.js has 501 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  const join = require('path').join;
                                  const CORE_JS_URIPATH = '/js/modules';
                                  const CORE_JS_BASEPATH = join(__dirname, '../../frontend', CORE_JS_URIPATH);
                                  
                                  const injections = [
                                  Severity: Major
                                  Found in backend/webserver/core-frontend-injections.js - About 1 day to fix

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

                                    module.exports = function(lib, dependencies) {
                                    
                                      var logger = dependencies('logger');
                                    
                                      function getSenderAddress(emailtoken, callback) {
                                    Severity: Major
                                    Found in modules/linagora.esn.messaging.email/lib/sender.js - About 7 hrs to fix

                                      Function ContactListController has 194 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        function ContactListController(
                                          $q,
                                          $log,
                                          $scope,
                                          $state,
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language