superdesk/superdesk-client-core

View on GitHub

Showing 3,654 of 3,654 total issues

Function getCropRotate has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    getCropRotate(crop: ICrop): ICrop {
        if (this.videoRef.current == null) {
            throw new Error('Could not get rotated video crop value');
        }

Severity: Minor
Found in scripts/extensions/videoEditor/src/VideoEditor.tsx - About 1 hr to fix

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

        render() {
            const {gettext} = superdeskApi.localization;
    
            return (
                <Modal

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

          render() {
              const value1Ids = (this.props.value1 ?? []).map(({guid}) => guid);
              const value2Ids = (this.props.value2 ?? []).map(({guid}) => guid);
      
              const allIds = uniq([...value1Ids, ...value2Ids]);
      Severity: Minor
      Found in scripts/apps/authoring-react/fields/package-items/difference.tsx - About 1 hr to fix

        Function runTansa has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function runTansa(contentProfile: IContentProfileV2, fieldsData: Map<string, unknown>) {
            // Disable tansa for all text fields.
            Array.from(document.querySelectorAll(
                'input[type="text"], textarea, [contenteditable]',
            )).forEach((el) => {
        Severity: Minor
        Found in scripts/apps/authoring-react/editor3-tansa-integration.tsx - About 1 hr to fix

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

              render() {
                  const ids1 = (this.props.attachmentsPrevious ?? []).map(({_id}) => _id);
                  const ids2 = (this.props.attachmentsCurrent ?? []).map(({_id}) => _id);
          
                  const stats = getDifferenceStatistics(

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

                render() {
                    const value1Ids = (this.props.value1 ?? []).map(({id}) => id);
                    const value2Ids = (this.props.value2 ?? []).map(({id}) => id);
            
                    const allIds = uniq([...value1Ids, ...value2Ids]);
            Severity: Minor
            Found in scripts/apps/authoring-react/fields/linked-items/difference.tsx - About 1 hr to fix

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

                  constructor($scope, $injector, $location, api, $rootScope, search, desks) {
                      super($scope, $location, search, desks);
              
                      const setTotalCount = super.setTotalCount.bind(this);
              
              
              Severity: Minor
              Found in scripts/apps/ingest/controllers/IngestListController.ts - About 1 hr to fix

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

                    render() {
                        const className = (
                            this.props.className != null ? this.props.className : 'item-association'
                        ) + (this.state.hover ? ' dragover' : '');
                
                
                Severity: Minor
                Found in scripts/apps/vocabularies/components/drop-zone.tsx - About 1 hr to fix

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

                      render() {
                          const {
                              style,
                              title,
                              children,
                  Severity: Minor
                  Found in scripts/apps/contacts/components/Form/ToggleBox.tsx - About 1 hr to fix

                    Function authenticateIngestProvider has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function authenticateIngestProvider(actions: Array<{label: string; onClick(): void}>) {
                        interface IProps {
                            closeModal(): void;
                        }
                    
                    
                    Severity: Minor
                    Found in scripts/apps/ingest/directives/authenticate-ingest-provider.tsx - About 1 hr to fix

                      Function call has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          $scope.call = function(macro: IMacro) {
                              const editor = editorResolver.get();
                              const isEditor3 = editor.version() === '3';
                              const useReplace = macro.replace_type === 'simple-replace' || macro.replace_type === 'keep-style-replace';
                              const isSimpleReplace = macro.replace_type === 'simple-replace';
                      Severity: Minor
                      Found in scripts/apps/authoring/macros/macros.ts - About 1 hr to fix

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

                                link: function(scope, elem, attrs) {
                                    scope.active = function(user) {
                                        return usersService.isActive(user);
                                    };
                        
                        
                        Severity: Minor
                        Found in scripts/apps/users/directives/UserListDirective.ts - About 1 hr to fix

                          Function FindReplaceDirective has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function FindReplaceDirective(editorResolver, macros) {
                              return {
                                  link: function(scope, elem) {
                                      const editor = editorResolver.get();
                          
                          
                          Severity: Minor
                          Found in scripts/apps/authoring/editor/find-replace.ts - About 1 hr to fix

                            Function getPublishWarningConfirmModal has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export function getPublishWarningConfirmModal(
                                warnings: Array<string>,
                                publishingAction: () => any,
                            ) {
                                return new Promise((resolve, reject) => {

                              Function waitForMediaAndInitCarousel has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                          scope.waitForMediaAndInitCarousel = (items) => {
                                              previousItems = _.cloneDeep(items);
                                              let field = _.find(items, (item) => !item[item.fieldId]);
                              
                                              scope.rel = field ? field.fieldId : null;

                                Function TaskPreviewDirective has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function TaskPreviewDirective(tasks, desks, notify, $filter) {
                                    var promise = desks.initialize();
                                
                                    return {
                                        templateUrl: 'scripts/apps/dashboard/workspace-tasks/views/task-preview.html',
                                Severity: Minor
                                Found in scripts/apps/dashboard/workspace-tasks/tasks.ts - About 1 hr to fix

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

                                      render() {
                                          const {group, data, toggleCollapseExpand} = this.props;
                                          const loadedItemsCount = data.itemIds.length;
                                  
                                          return (
                                  Severity: Minor
                                  Found in scripts/apps/dashboard/user-activity/components/Group.tsx - About 1 hr to fix

                                    Function removeParameter has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                                scope.removeParameter = function(param) {
                                                    var searchParameters = $location.search();
                                    
                                                    if (searchParameters.q && searchParameters.q.indexOf(param) >= 0) {
                                                        let newQuery = _.uniq(searchParameters.q.replace(param, '').trim()
                                    Severity: Minor
                                    Found in scripts/apps/search/directives/SearchTags.ts - About 1 hr to fix

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

                                          render() {
                                              if (this.state.messages.length < 1) {
                                                  return null;
                                              }
                                      
                                      
                                      Severity: Minor
                                      Found in scripts/core/notify/notify.tsx - About 1 hr to fix

                                        Function ResetPassworController has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function ResetPassworController($scope, $location, api, notify) {
                                            $scope.isSending = false;
                                            $scope.isReseting = false;
                                        
                                            var resetForm = function() {
                                        Severity: Minor
                                        Found in scripts/core/auth/auth.ts - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language