superdesk/superdesk-client-core

View on GitHub

Showing 3,654 of 3,654 total issues

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

export function Export(api, multi, notify, storage, session, urls) {
Severity: Minor
Found in scripts/apps/archive/directives/Export.ts - About 45 mins to fix

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

        open(item) {
            var _open = (_item) => {
                var actions = this.authoring.itemActions(_item);
    
                if (actions.edit) {
    Severity: Minor
    Found in scripts/apps/authoring/authoring/services/AuthoringWorkspaceService.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 MetadataService has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    export function MetadataService(api, subscribersService, vocabularies, $rootScope, session, $filter) {
    Severity: Minor
    Found in scripts/apps/authoring/metadata/metadata.ts - About 45 mins to fix

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

      function MultieditArticleDirective(authoring, content, multiEdit, lock, $timeout, notify) {
      Severity: Minor
      Found in scripts/apps/authoring/multiedit/multiedit.ts - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                    if (isLockedInCurrentSession(article)) {
                                        /**
                                         * using article doesn't work because it is missing properties
                                         * (at least slugline)
                                         */
        Severity: Major
        Found in scripts/apps/search/controllers/get-bulk-actions.tsx - About 45 mins to fix

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

          export function TransmissionDetailsDirective(api) {
              return {
                  templateUrl: 'scripts/apps/authoring/versioning/history/views/publish_queue.html',
                  scope: {
                      item: '=',

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

              api,
              $rootScope,
              notify,
              authoringWorkspace: AuthoringWorkspaceService,
              desks,
          Severity: Minor
          Found in scripts/apps/translations/services/TranslationService.ts - About 45 mins to fix

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

            export const MediaInfo: React.StatelessComponent<IProps> = (props) => {
                const datetime = ng.get('datetime');
            
                const item = props.item;
                const meta = [];
            Severity: Minor
            Found in scripts/apps/search/components/MediaInfo.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 ItemPreview has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            export function ItemPreview(asset, storage, desks, _, familyService, privileges) {
            Severity: Minor
            Found in scripts/apps/search/directives/ItemPreview.ts - About 45 mins to fix

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

              export function SearchTags($location, tags, asset, metadata, desks, $rootScope) {
              Severity: Minor
              Found in scripts/apps/search/directives/SearchTags.ts - About 45 mins to fix

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

                    asset,
                    multi,
                    superdesk,
                    keyboardManager,
                    api,
                Severity: Minor
                Found in scripts/apps/search/directives/MultiActionBar.ts - About 45 mins to fix

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

                  export function SearchService($location, session, multi,
                      preferencesService, moment, sortService) {
                  Severity: Minor
                  Found in scripts/apps/search/services/SearchService.ts - About 45 mins to fix

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

                        $scope: IScope,
                        modal,
                        notify,
                        lock,
                        session,
                    Severity: Minor
                    Found in scripts/apps/search/MultiImageEdit.ts - About 45 mins to fix

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

                      export function ItemContainer(desks) {
                          return {
                              scope: {
                                  item: '=',
                              },
                      Severity: Minor
                      Found in scripts/apps/search/directives/ItemContainer.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 IconMix has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                      const IconMix: React.StatelessComponent<any> = ({icon, subIcon, big, doubleSize, className, tooltip, color}) => {
                          let iconElement;
                      
                          if (subIcon) {
                              if (big) {
                      Severity: Minor
                      Found in scripts/core/ui/components/IconMix.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 showPopup has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          referenceElement: HTMLElement,
                          placement: Placement,
                          Component: React.ComponentType<{closePopup(): void}>,
                          zIndex?: number,
                          closeOnHoverEnd?: boolean,
                      Severity: Minor
                      Found in scripts/core/ui/components/popupNew.tsx - About 45 mins to fix

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

                            resource: string,
                            changes: Array<IResourceChange>,
                            currentItems: Array<T>,
                            refreshAllOnFieldsChange: Set<string> = new Set(),
                            abortSignal?: AbortSignal,
                        Severity: Minor
                        Found in scripts/core/helpers/CrudManager.tsx - About 45 mins to fix

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

                              editorState, types, selection, offset, fromEnd = false, firstFound = true): string | Array<string> {
                          Severity: Minor
                          Found in scripts/core/editor3/helpers/highlights.ts - About 45 mins to fix

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

                                editorState: EditorState,
                                contentState: ContentState,
                                block: ContentBlock,
                                newText: string,
                                diffMatchPatch,
                            Severity: Minor
                            Found in scripts/core/editor3/helpers/patch-editor-3-html.ts - About 45 mins to fix

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

                                  editorState: EditorState,
                                  content: ContentState,
                                  block: ContentBlock,
                                  offset: number,
                                  text: string,
                              Severity: Minor
                              Found in scripts/core/editor3/helpers/patch-editor-3-html.ts - About 45 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language