linagora/openpaas-esn

View on GitHub

Showing 726 of 2,177 total issues

Function esnEmailInputController has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function esnEmailInputController($q, emailService) {
    var self = this;

    self.$onInit = $onInit;
    self.availabilityValidator = availabilityValidator;

    Function esnCollaborationInvitationAcceptButton has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function esnCollaborationInvitationAcceptButton(
          esnCollaborationClientService
        ) {
          return {
            link: link,

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

          link: function(scope, elem, attrs, control) {
            var lastValue = null;
            control.$viewChangeListeners.push(function() {
              var companyName = control.$viewValue;
              if (companyName === lastValue) {
      Severity: Minor
      Found in frontend/js/modules/company.js - About 1 hr to fix

        Function CollaborationRequestMembershipActionUserNotificationController has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function CollaborationRequestMembershipActionUserNotificationController(
              objectTypeResolver
            ) {
              var self = this;
        
        

          Function esnAttachmentViewerGalleryService has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function esnAttachmentViewerGalleryService($log) {
              var DEFAULT_GALLERY = 'noname';
              var galleries = {};
          
              return {

            Function esnCollaborationInvitationDeclineButton has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function esnCollaborationInvitationDeclineButton(
                  esnCollaborationClientService,
                  session
                ) {
                  return {

              Function reduceConfiguration has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function reduceConfiguration(configurations, featuresConfigName) {
                    var result = configurations.modules.reduce(function(list, module) {
                      var features = _.find(module.configurations, { name: featuresConfigName });
              
                      // flatten the features configuration
              Severity: Minor
              Found in frontend/js/modules/config/config.service.js - About 1 hr to fix

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

                        link: function(scope, element) {
                          var container = element.find('#sub-header');
                
                          subHeaderService.registerContainer(injectHandler, destroyHandler);
                          ensureVisible();
                Severity: Minor
                Found in frontend/js/modules/subheader/sub-header-container.directive.js - About 1 hr to fix

                  Function updateTracker has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function updateTracker(user, data) {
                  
                      if (!user) {
                        return q.reject(new Error('User is required'));
                      }
                  Severity: Minor
                  Found in modules/linagora.esn.digest.daily/lib/tracker.js - About 1 hr to fix

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

                    module.exports = function(dependencies) {
                    
                      var arrayHelper = dependencies('helpers').array;
                    
                      function getLastResponse(message) {
                    Severity: Minor
                    Found in modules/linagora.esn.digest.daily/lib/weight/strategies/date.js - About 1 hr to fix

                      Function searchContacts has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function searchContacts(req, res) {
                          const options = {
                            user: req.user,
                            search: req.query.search,
                            limit: req.query.limit,

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

                        module.exports = dependencies => {
                          const { constants } = dependencies('esn-config');
                          const pubsub = dependencies('pubsub').global;
                          const logger = dependencies('logger');
                          const {
                        Severity: Minor
                        Found in modules/linagora.esn.contact/backend/lib/domain-members/index.js - About 1 hr to fix

                          Function indexAddressbookUserContacts has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            function indexAddressbookUserContacts(addressBookHomeClient, book, userId) {
                              var split = book._links.self.href.split('/');
                              var bookName = split.pop().split('.').shift();
                              var bookId = split.pop();
                              var query = { userId: userId };
                          Severity: Minor
                          Found in modules/linagora.esn.contact/backend/lib/tools.js - About 1 hr to fix

                            Function createAddressbook has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              function createAddressbook(req, res) {
                                const options = {
                                  ESNToken: req.token && req.token.token ? req.token.token : '',
                                  davserver: req.davserver
                                };

                              Function toVcard has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                function toVcard(json) {
                                  // See OR-1918 and https://dev.twitter.com/rest/reference/get/users/lookup
                                  var prop;
                                  var vcard = new ICAL.Component('vcard');
                              
                              
                              Severity: Minor
                              Found in modules/linagora.esn.contact.import.twitter/backend/lib/mapping.js - About 1 hr to fix

                                Function listCard has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function listCard(bookId, bookName, options) {
                                      options = options || {};
                                      var currentPage = options.page || 1;
                                      var limit = options.limit || CONTACT_LIST_PAGE_SIZE;
                                      var offset = (currentPage - 1) * limit;

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

                                  module.exports = dependencies => {
                                    const workers = {};
                                    const logger = dependencies('logger');
                                  
                                    return {
                                  Severity: Minor
                                  Found in modules/linagora.esn.jobqueue/backend/lib/workers.js - About 1 hr to fix

                                    Function contactSearchProviderService has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      function contactSearchProviderService(
                                        $q,
                                        esnSearchProvider,
                                        session,
                                        ContactAPIClient,

                                      Function commentMessage has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function commentMessage(message, inReplyTo, req, res) {
                                      
                                        var publishCommentActivity = function(parentMessage, childMessage) {
                                          publishCommentActivityHelper(req.user, inReplyTo, parentMessage, childMessage);
                                        };
                                      Severity: Minor
                                      Found in backend/webserver/controllers/messages.js - About 1 hr to fix

                                        Function checkEmailsAvailability has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function checkEmailsAvailability(req, res, next) {
                                          const emails = req.body;
                                          const emailsToAdd = emails.filter(email => req.targetUser.emails.indexOf(email) === -1);
                                        
                                          if (!emailsToAdd.length) {
                                        Severity: Minor
                                        Found in backend/webserver/middleware/users.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language