superdesk/superdesk-client-core

View on GitHub

Showing 3,654 of 3,654 total issues

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

export function FilterConditionsController($scope, contentFilters, notify, modal, $filter, content) {
Severity: Minor
Found in scripts/apps/content-filters/controllers/FilterConditionsController.ts - About 45 mins to fix

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

        render() {
            const {languages} = this.state;
    
            if (languages == null) {
                return null;
    Severity: Minor
    Found in scripts/apps/vocabularies/components/VocabularyItemsViewEdit.tsx - 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 DeskeditStages has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    export function DeskeditStages(api, WizardHandler, tasks, desks, notify, macros) {
    Severity: Minor
    Found in scripts/apps/desks/directives/DeskeditStages.ts - About 45 mins to fix

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

          $timeout,
          $filter,
          search,
          datetime,
          Keys,
      Severity: Minor
      Found in scripts/apps/contacts/directives/ContactList.ts - About 45 mins to fix

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

        export function TemplatesService(api, session, $q, preferencesService, privileges, desks) {
        Severity: Minor
        Found in scripts/apps/templates/services/TemplatesService.ts - About 45 mins to fix

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

          export function IngestSourcesContent(ingestSources, api, $location,
              modal, $filter, privileges) {
          Severity: Minor
          Found in scripts/apps/ingest/directives/IngestSourcesContent.ts - About 45 mins to fix

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

            export function MarkedItemTitle(desks, authoring, highlightsService, $filter, $location, $timeout) {
            Severity: Minor
            Found in scripts/apps/archive/directives/MarkedItemTitle.ts - About 45 mins to fix

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

                  this.upload = function(dictionary, data, file, success, error, progress) {
              Severity: Minor
              Found in scripts/apps/dictionaries/services/DictionaryService.ts - About 45 mins to fix

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

                export function ItemPriority(metadata) {
                    metadata.initialize();
                    return {
                        scope: {priority: '='},
                        template: [
                Severity: Minor
                Found in scripts/apps/archive/directives/ItemPriority.ts - 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 ArchiveService has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                export function ArchiveService(desks, session, api, $q, search, $location) {
                Severity: Minor
                Found in scripts/apps/archive/services/ArchiveService.ts - About 45 mins to fix

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

                  export function MediaPreview(api, $rootScope, desks, superdesk, content, storage) {
                  Severity: Minor
                  Found in scripts/apps/archive/directives/MediaPreview.ts - About 45 mins to fix

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

                    export function UserEnableCommand(api, data, $q, notify, usersService, $rootScope) {
                    Severity: Minor
                    Found in scripts/apps/users/controllers/UserEnableCommand.ts - About 45 mins to fix

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

                      export function ProfileService(api) {
                          var RESOURCE = 'activity';
                      
                          /**
                           * Get all activity of single user, being it content related or not
                      Severity: Minor
                      Found in scripts/apps/users/services/ProfileService.ts - 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 UserRolesDirective has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      export function UserRolesDirective(api, notify, modal, $filter, _, metadata) {
                      Severity: Minor
                      Found in scripts/apps/users/directives/UserRolesDirective.ts - About 45 mins to fix

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

                        export function HighlightsConfig($scope, highlightsService, desks, api, notify, modal) {
                        Severity: Minor
                        Found in scripts/apps/highlights/controllers/HighlightsConfig.ts - About 45 mins to fix

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

                          export function UserListController($scope, $location, api, _, session, usersService) {
                          Severity: Minor
                          Found in scripts/apps/users/controllers/UserListController.ts - About 45 mins to fix

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

                            function CommentsCtrl($scope, $routeParams, commentsService) {
                                $scope.text = null;
                                $scope.saveEnterFlag = false;
                                $scope.$watch('item._id', reload);
                                $scope.users = [];
                            Severity: Minor
                            Found in scripts/apps/authoring/comments/comments.ts - 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 ItemUrgency has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                            export function ItemUrgency(metadata) {
                                metadata.initialize();
                                return {
                                    scope: {urgency: '='},
                                    template: [
                            Severity: Minor
                            Found in scripts/apps/archive/directives/ItemUrgency.ts - 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 ContentResults has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            export function ContentResults($location, preferencesService, packages: IPackagesService, tags, asset, search) {
                            Severity: Minor
                            Found in scripts/apps/archive/directives/ContentResults.ts - About 45 mins to fix

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

                              function UserImportService(api, $q) {
                                  function reject(key, message) {
                                      var error: any = {};
                              
                                      error[key] = 1;
                              Severity: Minor
                              Found in scripts/apps/users/import/import.ts - 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