linagora/openpaas-esn

View on GitHub

Showing 726 of 2,177 total issues

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

    $log,
    _,
    session,
    attendeeService,
    esnI18nService,

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

      function ESNAttachmentController($compile, $element, $scope, $log, esnAttachmentViewerService, esnAttachmentViewerGalleryService, esnAttachmentRegistryService) {
    Severity: Major
    Found in frontend/js/modules/attachment/attachment.controller.js - About 50 mins to fix

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

        function followingListController($scope, session, userUtils, FollowScrollBuilder, FollowPaginationHelper, _, FOLLOW_PAGE_SIZE) {
      Severity: Major
      Found in frontend/js/modules/follow/list/following-list.controller.js - About 50 mins to fix

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

            controller: function($scope, $route, $window, invitationAPI, loginAPI, _) {

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

              function userStatusWebsocketService($rootScope, _, livenotification, userStatusService, USER_STATUS_EVENTS, USER_STATUS_NAMESPACE) {

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

            module.exports = function(dependencies, lib) {
            
              function canReplyTo(req, res, next) {
                var to = req.query.to || req.headers[TO_HEADER];
                if (!to) {

            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 userStatusSyncService has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                function userStatusSyncService($q, $rootScope, _, userStatusClientService, userStatusService, USER_STATUS_EVENTS) {

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

                function run($interval, $rootScope, userStatusSyncService, userStatusWebsocketService, session, USER_STATUS_SYNC_INTERVAL) {
              Severity: Minor
              Found in modules/linagora.esn.user.status/frontend/app/user-status.run.js - About 45 mins to fix

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

                    controller: function($timeout, $route, $window, invitationAPI, loginAPI, _) {

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

                      $q,
                      esnSearchProvider,
                      session,
                      ContactAPIClient,
                      CONTACT_GLOBAL_SEARCH,

                    Function exports has a Cognitive Complexity of 8 (exceeds 5 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 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 registerAddressbookPaginationModes has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        AddressBookPaginationRegistry,
                        AddressBookPaginationProvider,
                        SearchAddressBookPaginationProvider,
                        MultipleAddressBookPaginationProvider,
                        CONTACT_LIST_DISPLAY_MODES,

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

                          dynamicDirectiveService,
                          attendeeService,
                          ContactAttendeeProvider,
                          AddressbookCache,
                          ContactShellBuilder,
                      Severity: Minor
                      Found in modules/linagora.esn.contact/frontend/app/app.run.js - About 45 mins to fix

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

                            contactAddressbookParser,
                            contactAddressbookACLHelper,
                            ContactSharee,
                            CONTACT_ADDRESSBOOK_PUBLIC_RIGHT,
                            CONTACT_ADDRESSBOOK_AUTHENTICATED_PRINCIPAL,

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

                              _,
                              esnConfig,
                              contactAddressbookDisplayShellRegistry,
                              ContactAddressbookDisplayShell,
                              contactGroupAddressbookService,

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

                            module.exports = dependencies => {
                              const client = require('../client')(dependencies);
                            
                              return {
                                contentTypes: CONTENT_TYPES,
                            Severity: Minor
                            Found in modules/linagora.esn.contact/backend/lib/dav-import/vcard-handler.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 contactAddressbookACLHelper has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                _,
                                session,
                                contactAddressbookParser,
                                DEFAULT_ADDRESSBOOK_NAME,
                                CONTACT_COLLECTED_ADDRESSBOOK_NAME,

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

                                  $timeout,
                                  ContactListScrollingService,
                                  contactService,
                                  sharedContactDataService,
                                  CONTACT_EVENTS,

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

                                    ContactsHelper,
                                    urlUtils,
                                    contactAvatarService,
                                    ContactLocationHelper,
                                    CONTACT_ATTRIBUTES_ORDER,

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

                                  module.exports = function() {
                                  
                                    function toVcard(json) {
                                      // See OR-1918 and https://dev.twitter.com/rest/reference/get/users/lookup
                                      var prop;
                                  Severity: Minor
                                  Found in modules/linagora.esn.contact.import.twitter/backend/lib/mapping.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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language