superdesk/superdesk-client-core

View on GitHub

Showing 3,654 of 3,654 total issues

Function getActionsBulk has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    return function getActionsBulk(articles: Array<IArticle>) {
        const someItemsLocked = articles.some(isLocked);
        const someItemsLockedInOtherSession = articles.some(isLockedInOtherSession);

        if (articles.some((article) => !canChangeMarkedUser(superdesk, article))) {
Severity: Minor
Found in scripts/extensions/markForUser/src/get-article-actions-bulk.tsx - About 1 hr to fix

    Function getEditor3RichTextFormattingOptions has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const getEditor3RichTextFormattingOptions = (): {[MEMBER in RICH_FORMATTING_OPTION]: string} => {
        return {
            'h1': gettext('h1'),
            'h2': gettext('h2'),
            'h3': gettext('h3'),

      Function render has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          render() {
              return (
                  <AuthoringWidgetLayout
                      header={(
                          <AuthoringWidgetHeading

        Function component has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                        onClick={() => {
                            showModal(({closeModal}) => (
                                <Modal
                                    visible
                                    size="small"
        Severity: Minor
        Found in scripts/apps/authoring-react/authoring-angular-integration.tsx - About 1 hr to fix

          Function render has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              render(): React.ReactNode {
                  const state = this.state;
          
                  if (!state.initialized) {
                      return null;
          Severity: Minor
          Found in scripts/apps/authoring-react/toolbar/highlights-management.tsx - About 1 hr to fix

            Function ActionPicker has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function ActionPicker(desks, macros) {
                return {
                    scope: {
                        desk: '=',
                        stage: '=',
            Severity: Minor
            Found in scripts/apps/desks/directives/ActionPicker.ts - About 1 hr to fix

              Function CreateTemplateController has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function CreateTemplateController(
                  item,
                  templates,
                  api,
                  desks,
              Severity: Minor
              Found in scripts/apps/templates/controllers/CreateTemplateController.ts - About 1 hr to fix

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

                        link: function(scope, elem, attr) {
                            scope.$watch('item', (item) => {
                                scope.selectedSubscribers = {items: []};
                
                                if (item && !scope.customSubscribers) {
                Severity: Minor
                Found in scripts/apps/archive/directives/ResendItem.ts - About 1 hr to fix

                  Function itemActions has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      this.itemActions = function(item, userDesks) {
                          var currentItem = this._getCurrentItem(item);
                          var userPrivileges = privileges.privileges;
                          var action = angular.extend({}, helpers.DEFAULT_ACTIONS);
                          var itemOnReadOnlyStage = item && item.task && item.task.stage && desks.isReadOnlyStage(item.task.stage);
                  Severity: Minor
                  Found in scripts/apps/authoring/authoring/services/AuthoringService.ts - About 1 hr to fix

                    Function correction has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        this.correction = function correction(item: IPublishedArticle, handleIsCorrection, removeCorrection = false) {
                            var authoringWorkspace: AuthoringWorkspaceService = $injector.get('authoringWorkspace');
                            let extDiff = {};
                    
                            desks.initialize()
                    Severity: Minor
                    Found in scripts/apps/authoring/authoring/services/AuthoringService.ts - About 1 hr to fix

                      Function descheduled has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              const descheduled = () => {
                                  const errors = [];
                                  const success = [];
                      
                                  Promise.all(
                      Severity: Minor
                      Found in scripts/apps/search/controllers/get-multi-actions.tsx - About 1 hr to fix

                        Function constructor has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            constructor(props: IProps) {
                                super(props);
                        
                                this.state = {
                                    itemsList: [],
                        Severity: Minor
                        Found in scripts/apps/search/components/ItemListAngularWrapper.tsx - About 1 hr to fix

                          Function doPublish has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              doPublish(applyDestination?: boolean): void {
                                  this.props.handleUnsavedChanges()
                                      .then((item) => {
                                          const emptyPatches: Array<Partial<IArticle>> = [{}];
                          
                          

                            Function loadMore has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function loadMore(
                                    /**
                                     * A Parameter is accepted to support {@link IExposedFromVirtualList.reloadAll}
                                     * Otherwise {@link items} that are already in scope could be used.
                                     */
                            Severity: Minor
                            Found in scripts/core/ui/components/virtual-lists/virtual-list.tsx - About 1 hr to fix

                              Function waitForMediaToLoad has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  new Promise((resolve) => {
                                      const filteredElements = elements.filter((element) => {
                                          if (isImage(element)) {
                                              return element.complete === false;
                                          } else if (isAudio(element) || isVideo(element)) {
                              Severity: Minor
                              Found in scripts/core/helpers/waitForMediaToBeReady.ts - About 1 hr to fix

                                Function getCell has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export function getCell(data: IEditor3TableData, row, col, currentStyle, selection): EditorState {
                                    const decorator = new CompositeDecorator([LinkDecorator]);
                                    const {cells} = data;
                                    let cellEditorState;
                                
                                
                                Severity: Minor
                                Found in scripts/core/editor3/helpers/table.ts - About 1 hr to fix

                                  Function DeployConfigFactory has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function DeployConfigFactory(api, $q) {
                                      /**
                                       * Deploy config service
                                       *
                                       * provides deployment related config from server
                                  Severity: Minor
                                  Found in scripts/core/config.ts - About 1 hr to fix

                                    Function replaceAllForEachBlock has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export function replaceAllForEachBlock(
                                        contentState: ContentState,
                                        regex: RegExp, // a global regex must be passed
                                        replaceWith: string,
                                    ): ContentState {
                                    Severity: Minor
                                    Found in scripts/core/editor3/helpers/find-replace.tsx - About 1 hr to fix

                                      Function insertMedia has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export function insertMedia(files?, targetBlockKey = null) {
                                          const superdesk = ng.get('superdesk');
                                          const renditions = ng.get('renditions');
                                      
                                          const editedMedia = [];
                                      Severity: Minor
                                      Found in scripts/core/editor3/actions/toolbar.tsx - About 1 hr to fix

                                        Function updateText has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function updateText(
                                            editorState: EditorState,
                                            contentState: ContentState,
                                            block: ContentBlock,
                                            newText: string,
                                        Severity: Minor
                                        Found in scripts/core/editor3/helpers/patch-editor-3-html.ts - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language