linagora/openpaas-esn

View on GitHub

Showing 726 of 2,177 total issues

Function GoogleDisplayShell has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var GoogleDisplayShell = function(shell) {
      if (shell) {
        this.shell = shell;
        this.overlayIcon = {iconClasses: 'i-contact-google'};
        this.dropDownMenuDirective = 'google-menu-items';

    Function validate has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function validate(moduleName, configName, value) {
      const module = registry.getFromModule(moduleName);
    
      if (!module) {
        return q({
    Severity: Minor
    Found in backend/core/esn-config/validator/index.js - About 1 hr to fix

      Function save has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function save(notification, callback) {
        if (!notification) {
          return callback(new Error('Notification can not be null'));
        }
      
      
      Severity: Minor
      Found in backend/core/notification/notification.js - About 1 hr to fix

        Function generateFromText has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function generateFromText(options) {
          if (!options || !options.text) {
            return null;
          }
        
        
        Severity: Minor
        Found in backend/core/image/generate-avatar.js - About 1 hr to fix

          Function inspectConfigurations has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function inspectConfigurations(modules, domainId, userId) {
            let role;
          
            if (domainId && userId) {
              role = ROLE.user;
          Severity: Minor
          Found in backend/core/esn-config/configurations.js - About 1 hr to fix

            Function list has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function list(options) {
              var defer = q.defer();
              var query = {};
            
              if (options.type) {
            Severity: Minor
            Found in backend/core/resource-link/index.js - About 1 hr to fix

              Function deleteFoundsAndContinueSearch has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  const deleteFoundsAndContinueSearch = founds => {
                    scrollIds.push(founds._scroll_id);
              
                    if (founds.hits.total === 0) {
                      return q.when({ deleted });
              Severity: Minor
              Found in backend/core/elasticsearch/elasticsearch.js - About 1 hr to fix

                Function getCollaborationsForTuple has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function getCollaborationsForTuple(tuple, callback) {
                  if (!tuple) {
                    return callback(new Error('Tuple is required'));
                  }
                
                
                Severity: Minor
                Found in backend/core/collaboration/index.js - About 1 hr to fix

                  Function $onInit has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        function $onInit() {
                          self.error = false;
                          self.loading = true;
                  
                          objectTypeResolver.resolve(self.notification.complement.objectType, self.notification.complement.id)

                    Function replaceItem has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        Categorize.prototype.replaceItem = function replaceItem(item) {
                          var self = this;
                          var letter = charAPI.getAsciiUpperCase(item[self.sortBy].charAt(0)) || self.keepAllKey;
                          var oldCategory = self.getItemCategories(item)[0];
                          var oldCategoryIndex = self.keys.indexOf(oldCategory);
                    Severity: Minor
                    Found in frontend/js/modules/alphalist.js - About 1 hr to fix

                      Function followAPI has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function followAPI(esnRestangular, session) {
                          return {
                            follow: follow,
                            unfollow: unfollow,
                            getFollowers: getFollowers,
                      Severity: Minor
                      Found in frontend/js/modules/follow/follow-api-client.service.js - About 1 hr to fix

                        Function esnSearchService has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          function esnSearchService(_, $state) {
                            return {
                              search: search
                            };
                        
                        
                        Severity: Minor
                        Found in frontend/js/modules/search/search.service.js - About 1 hr to fix

                          Function esnShortcutsGlobal has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            function esnShortcutsGlobal(
                              esnShortcuts,
                              esnShortcutsSheet,
                              esnShortcutsAction,
                              ESN_SHORTCUTS_DEFAULT_CATEGORY
                          Severity: Minor
                          Found in frontend/js/modules/shortcuts/shortcuts-global.service.js - About 1 hr to fix

                            Function esnAttachmentViewerService has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              function esnAttachmentViewerService($log, $rootScope, $compile, esnAttachmentViewerGalleryService) {
                                var currentItem = {};
                                var viewer = null;
                            
                                return {
                            Severity: Minor
                            Found in frontend/js/modules/attachment/viewer/attachment-viewer.service.js - About 1 hr to fix

                              Function controlcenterGeneralController has 8 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  $q,
                                  $window,
                                  esnUserConfigurationService,
                                  asyncAction,
                                  homePageService,

                                Function deleteContact has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    $rootScope,
                                    $q,
                                    contactService,
                                    gracePeriodService,
                                    notificationFactory,

                                  Consider simplifying this complex logical expression.
                                  Open

                                          if (next && next.name && nextParams &&
                                              next.name === 'contact.addressbooks.edit' &&
                                              nextParams.bookId === $scope.bookId &&
                                              nextParams.bookName === $scope.bookName &&
                                              nextParams.cardId === $scope.cardId) {

                                    Function ContactSidebarController has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        $scope,
                                        $q,
                                        _,
                                        userAPI,
                                        userUtils,

                                      Function contactAddressbookSettingsController has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          $q,
                                          _,
                                          $state,
                                          $stateParams,
                                          asyncAction,

                                        Function registerDefaultAddressbookDisplayShell has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            contactAddressbookDisplayShellRegistry,
                                            ContactDefaultAddressbookDisplayShell,
                                            contactDefaultAddressbookHelper,
                                            contactAddressbookActionEdit,
                                            contactAddressbookActionDelete,
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language