superdesk/superdesk-client-core

View on GitHub

Showing 3,654 of 3,654 total issues

Function AuthExpiredInterceptor has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

function AuthExpiredInterceptor(session, $q, $injector, $browser, _) {
Severity: Minor
Found in scripts/core/auth/auth.ts - About 35 mins to fix

    Function updateMedia has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        contentState: ContentState,
        block: ContentBlock,
        newDescription: string,
        newAlt: string,
        newHeadline: string,
    Severity: Minor
    Found in scripts/core/editor3/helpers/patch-editor-3-html.ts - About 35 mins to fix

      Function uploadFileWithProgress has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          endpoint: string,
          data: FormData,
          onProgress: (event: ProgressEvent) => void,
          method?: 'POST' | 'PATCH',
          etag?: string,
      Severity: Minor
      Found in scripts/core/helpers/network.tsx - About 35 mins to fix

        Function removeText has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

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

          Function getCell has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          export function getCell(data: IEditor3TableData, row, col, currentStyle, selection): EditorState {
          Severity: Minor
          Found in scripts/core/editor3/helpers/table.ts - About 35 mins to fix

            Function connectCrudManagerHttp has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                WrappedComponent, // : React.ComponentType<Props & PropsToConnect>
                name: string,
                endpoint: string,
                defaultSortOption: ISortOption,
                formatFiltersForServer?: (filters: ICrudManagerFilters) => ICrudManagerFilters,
            Severity: Minor
            Found in scripts/core/helpers/crud-manager-http.tsx - About 35 mins to fix

              Function insertText has 5 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 35 mins to fix

                Function resizeDraftSelection has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                export function resizeDraftSelection(stretchLeft, stretchRight, selection, editorState, limitedToSingleBlock = false) {
                Severity: Minor
                Found in scripts/core/editor3/helpers/resizeDraftSelection.ts - About 35 mins to fix

                  Function setActiveCell has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  export function setActiveCell(i, j, key, currentStyle, selection): ISetActiveCellReturnType {
                  Severity: Minor
                  Found in scripts/core/editor3/actions/editor3.tsx - About 35 mins to fix

                    Function link has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            link: function(scope, element, attrs, controller, $transclude) {
                    Severity: Minor
                    Found in scripts/core/list/list.ts - About 35 mins to fix

                      Function getHighlightDataAtOffset has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      export function getHighlightDataAtOffset(editorState, types, selection, offset, fromEnd = false) {
                      Severity: Minor
                      Found in scripts/core/editor3/helpers/highlights.ts - About 35 mins to fix

                        Function ReloadService has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        function ReloadService($window, $rootScope, session, desks, superdeskFlags) {
                        Severity: Minor
                        Found in scripts/core/notification/notification.ts - About 35 mins to fix

                          Function pasteContentFromOpenEditor has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              html: string,
                              editorState: EditorState,
                              editorKey: string,
                              onChange: (e: EditorState) => void,
                              editorFormat: Array<string>,
                          Severity: Minor
                          Found in scripts/core/editor3/components/handlePastedText.ts - About 35 mins to fix

                            Function insertEntity has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                editorState: EditorState,
                                draftEntityType,
                                mutability,
                                data,
                                targetBlockKeyInitial = null,
                            Severity: Minor
                            Found in scripts/core/editor3/helpers/draftInsertEntity.ts - About 35 mins to fix

                              Function actionOnItem has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      this.actionOnItem = function(action, group, item, useFullButtonText, confirm) {
                              Severity: Minor
                              Found in e2e/client/specs/helpers/monitoring.ts - About 35 mins to fix

                                Function SpellcheckMenuController has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                function SpellcheckMenuController($rootScope, editorResolver, spellcheck, notify, $scope) {
                                Severity: Minor
                                Found in scripts/core/spellcheck/spellcheck.ts - About 35 mins to fix

                                  Function confirmArgumentsList has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                              bodyText = defaults.bodyText,
                                              headerText = defaults.headerText,
                                              okText = defaults.okText,
                                              cancelText = defaults.cancelText,
                                              additionalCancelText = defaults.additionalCancelText,
                                  Severity: Minor
                                  Found in scripts/core/services/modalService.tsx - About 35 mins to fix

                                    Function confirmBase has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                                bodyText,
                                                headerText,
                                                okText,
                                                cancelText,
                                                additionalCancelText,
                                    Severity: Minor
                                    Found in scripts/core/services/modalService.tsx - About 35 mins to fix

                                      Similar blocks of code found in 5 locations. Consider refactoring.
                                      Open

                                              const {
                                                  item,
                                                  title,
                                                  removeButton,
                                                  metadata,
                                      scripts/apps/authoring-react/fields/media/media-carousel/audio.tsx on lines 19..27
                                      scripts/core/ui/components/ToggleBox/index.tsx on lines 71..79
                                      scripts/core/ui/components/Spacer.tsx on lines 8..8
                                      scripts/core/ui/components/select-filterable.tsx on lines 21..21

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 47.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 5 locations. Consider refactoring.
                                      Open

                                              const {h, v, gap, justifyContent, alignItems, noGrow, noWrap} = this.props;
                                      Severity: Major
                                      Found in scripts/core/ui/components/Spacer.tsx and 4 other locations - About 35 mins to fix
                                      scripts/apps/authoring-react/fields/media/media-carousel/audio.tsx on lines 19..27
                                      scripts/apps/authoring-react/fields/media/media-carousel/video.tsx on lines 20..28
                                      scripts/core/ui/components/ToggleBox/index.tsx on lines 71..79
                                      scripts/core/ui/components/select-filterable.tsx on lines 21..21

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 47.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language