linagora/openpaas-esn

View on GitHub

Showing 726 of 2,177 total issues

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

module.exports = function(dependencies) {

  var googleContactToVcard = require('./mapping')(dependencies);
  var importContactClient = dependencies('contact-import').lib.import;
  var CONTACT_IMPORT_ERROR = dependencies('contact-import').constants.CONTACT_IMPORT_ERROR;
Severity: Major
Found in modules/linagora.esn.contact.import.google/backend/lib/importer.js - About 4 hrs to fix

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

      function ContactSidebarController(
        $scope,
        $q,
        _,
        userAPI,

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

      module.exports = function() {
      
        function getFormattedName(json) {
          if (json.title[0]) {
            return json.title[0];
      Severity: Major
      Found in modules/linagora.esn.contact.import.google/backend/lib/mapping.js - About 4 hrs to fix

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

              link: function(scope) {
                scope.streams = scope.streams || [];
                scope.streams = scope.streams.concat(scope.activitystream);
        
                scope.lastPost = {
        Severity: Major
        Found in frontend/js/modules/activitystream/directives.js - About 4 hrs to fix

          Function contactAddressbookACLHelper has 108 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function contactAddressbookACLHelper(
              _,
              session,
              contactAddressbookParser,
              DEFAULT_ADDRESSBOOK_NAME,

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

              function link(scope, element, attrs) {
                if (deviceDetector.isMobile()) { return; }
            
                var tooltipElement;
                var startX, startY;
            Severity: Major
            Found in frontend/js/modules/dragndrop.js - About 4 hrs to fix

              File configuration.js has 343 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              'use strict';
              
              const q = require('q');
              const { promisify } = require('util');
              const composableMw = require('composable-middleware');
              Severity: Minor
              Found in backend/webserver/middleware/configuration.js - About 4 hrs to fix

                Function contactAddressbookSharedConfigurationController has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function contactAddressbookSharedConfigurationController(
                    $log,
                    _,
                    asyncAction,
                    session,

                  Function profileEditController has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function profileEditController(
                      $q,
                      $state,
                      esnConfigApi,
                      esnConfig,

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

                    module.exports = function(dependencies, options = {}) {
                      const searchClient = require('../search')(dependencies);
                      const { getGroupAddressbookHomes } = require('./group-addressbook-home')(dependencies);
                      const {
                        ESNToken,
                    Severity: Major
                    Found in modules/linagora.esn.contact/backend/lib/client/client.js - About 4 hrs to fix

                      Function ContactShowController has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function ContactShowController(
                          $log,
                          $scope,
                          $state,
                          $timeout,

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

                        module.exports = dependencies => {
                          const coreUserModule = dependencies('user');
                          const esnConfig = dependencies('esn-config');
                          const logger = dependencies('logger');
                          const client = require('../client')(dependencies);

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

                            function VcardBuilder(ICAL, ContactsHelper) {
                          
                              this.toVcard = function(shell) {
                                var prop;
                                var vcard = new ICAL.Component('vcard');

                            Function start has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function start(callback) {
                            
                              if (!webserver.port && !webserver.ssl_port) {
                                console.error('The webserver needs to be configured before it is started');
                                process.exit(1);
                            Severity: Major
                            Found in backend/webserver/index.js - About 3 hrs to fix

                              Function esnCollaborationInviteUsers has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                function esnCollaborationInviteUsers(
                                  $q,
                                  $rootScope,
                                  notificationFactory,
                                  session,

                                Function esnConfigApi has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  function esnConfigApi(Restangular, esnRestangular, ESN_CONFIG_SCOPE) {
                                    return {
                                      inspectPlatformConfigurations: inspectPlatformConfigurations,
                                      inspectDomainConfigurations: inspectDomainConfigurations,
                                      inspectUserConfigurations: inspectUserConfigurations,
                                Severity: Major
                                Found in frontend/js/modules/config/config-api.service.js - About 3 hrs to fix

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

                                  module.exports = dependencies => {
                                    const technicalUser = dependencies('technical-user');
                                    const userModule = dependencies('user');
                                    const contactModule = dependencies('contact');
                                    const logger = dependencies('logger');
                                  Severity: Major
                                  Found in modules/linagora.esn.contact.import/backend/lib/helper.js - About 3 hrs to fix

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

                                    'use strict';
                                    
                                    var mongoose = require('mongoose');
                                    var async = require('async');
                                    var attachments = require('./attachments');
                                    Severity: Minor
                                    Found in backend/core/message/index.js - About 3 hrs to fix

                                      Function sendMessage has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          $scope.sendMessage = function() {
                                            if (!$scope.messageContent || $scope.messageContent.trim().length === 0) {
                                              $scope.displayError('You can not say nothing!');
                                      
                                      return;
                                      Severity: Major
                                      Found in frontend/js/modules/message.js - About 3 hrs to fix

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

                                        module.exports = function(domains, host) {
                                          var jmapHost = process.env.JMAP_SERVER_HOST || host || 'localhost';
                                          var port = process.env.JMAP_SERVER_PORT || 1080;
                                          var path = process.env.JMAP_SERVER_PATH || 'jmap';
                                          var isJmapSendingEnabled = process.env.JMAP_SENDING_ENABLED !== 'false';
                                        Severity: Major
                                        Found in fixtures/populate/data/configuration.js - About 3 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language