superdesk/superdesk-client-core

View on GitHub

Showing 3,654 of 3,654 total issues

Function getFormConfig has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function getFormConfig(): IFormGroup {
    const formConfig: IFormGroup = {
        type: 'inline',
        direction: 'vertical',
        form: [

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

        render() {
            const {placeholder, field, label, value, readOnly, popupContainer, onFocus, ...props} = this.props;
    
            return (
                <LineInput {...props} readOnly={readOnly}>
    Severity: Minor
    Found in scripts/core/ui/components/Form/TimeInput/index.tsx - About 1 hr to fix

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

          render() {
              const {
                  onClose,
                  target,
                  popupContainer,
      Severity: Minor
      Found in scripts/core/ui/components/Form/SelectTagInput/SelectTagPopup.tsx - About 1 hr to fix

        Function reloadIdentifier has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            this.reloadIdentifier = function(msg) {
                var result = {
                    reload: false,
                    message: null,
                };
        Severity: Minor
        Found in scripts/core/notification/notification.ts - About 1 hr to fix

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

              render() {
                  const {dimensions} = this.state;
          
                  return (
                      <div
          Severity: Minor
          Found in scripts/core/components/resize-observer-component.tsx - About 1 hr to fix

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

                    link: function(scope, el) {
                        scope.timeZones = []; // all time zones to choose from
                        scope.tzSearchTerm = ''; // the current time zone search term
                        scope.getTimezoneLabel = getTimezoneLabel;
            
            
            Severity: Minor
            Found in scripts/core/ui/ui.ts - About 1 hr to fix

              Function DatepickerDirective has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function DatepickerDirective($document) {
                  return {
                      scope: {
                          dt: '=ngModel',
                          disabled: '=ngDisabled',
              Severity: Minor
              Found in scripts/core/ui/ui.ts - About 1 hr to fix

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

                    render() {
                        const {active, label} = this.props;
                        const iconClass = StyleIcons[label];
                
                        const cx = classNames({
                Severity: Minor
                Found in scripts/core/editor3/components/toolbar/StyleButton.tsx - About 1 hr to fix

                  Function SuperdeskViewController has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          function SuperdeskViewController(superdeskFlags, superdesk, $scope, $route, session, $timeout) {
                              setupFullWidthPage($scope);
                  
                              $scope.session = session;
                  
                  
                  Severity: Minor
                  Found in scripts/core/menu/menu.ts - About 1 hr to fix

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

                        constructor() {
                            var self = this;
                    
                            this.checkbox = element(by.model('provider.is_default'));
                            this.addSourceButton = element(by.css('[ng-click="edit()"]'));
                    Severity: Minor
                    Found in e2e/client/specs/helpers/pages.ts - About 1 hr to fix

                      Function SearchResults has 12 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          $location,
                          preferencesService,
                          packages: IPackagesService,
                          asset,
                          $timeout,
                      Severity: Major
                      Found in scripts/apps/search/directives/SearchResults.ts - About 1 hr to fix

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                                    preferencesService.get('archive:view').then((result) => {
                                        savedView = result.view;
                                        scope.view = !!savedView && savedView !== 'undefined' ? savedView : 'mgrid';
                                    });
                        Severity: Major
                        Found in scripts/apps/archive/directives/ContentResults.ts and 1 other location - About 1 hr to fix
                        scripts/apps/search/directives/SearchResults.ts on lines 555..558

                        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 65.

                        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

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                                    preferencesService.get('archive:view').then((result) => {
                                        savedView = result.view;
                                        scope.view = !!savedView && savedView !== 'undefined' ? savedView : 'mgrid';
                                    });
                        Severity: Major
                        Found in scripts/apps/search/directives/SearchResults.ts and 1 other location - About 1 hr to fix
                        scripts/apps/archive/directives/ContentResults.ts on lines 60..63

                        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 65.

                        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

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                                        <span className={classNames('icn-mix', className)}>
                                            <Icon icon={subIcon} className="icn-mix__sub-icn" color={color} />
                                            <Icon icon={icon} doubleSize={doubleSize} big={big} color={color} />
                                        </span>
                        Severity: Major
                        Found in scripts/core/ui/components/IconMix.tsx and 1 other location - About 1 hr to fix
                        scripts/core/ui/components/IconMix.tsx on lines 30..33

                        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 65.

                        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

                              Watch.prototype.addUndoHandler =
                                function addUndoHandler(name, fn, resolve) {
                                  if (!name || !fn) {
                                    throw new Error('invalid parameters');
                                  }
                        Severity: Major
                        Found in scripts/libs/angular-history/history.js and 4 other locations - About 1 hr to fix
                        scripts/libs/angular-history/history.js on lines 191..197
                        scripts/libs/angular-history/history.js on lines 231..237
                        scripts/libs/angular-history/history.js on lines 251..257
                        scripts/libs/angular-history/history.js on lines 271..277

                        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 65.

                        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

                              Watch.prototype.addRevertHandler =
                                function addRevertHandler(name, fn, resolve) {
                                  if (!name || !fn) {
                                    throw new Error('invalid parameters');
                                  }
                        Severity: Major
                        Found in scripts/libs/angular-history/history.js and 4 other locations - About 1 hr to fix
                        scripts/libs/angular-history/history.js on lines 191..197
                        scripts/libs/angular-history/history.js on lines 211..217
                        scripts/libs/angular-history/history.js on lines 231..237
                        scripts/libs/angular-history/history.js on lines 271..277

                        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 65.

                        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

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                                        <span className={classNames('icn-mix', 'icn-mix--2x', className)}>
                                            <Icon icon={subIcon} className="icn-mix__sub-icn" color={color} />
                                            <Icon icon={icon} doubleSize={doubleSize} big={big} color={color} />
                                        </span>
                        Severity: Major
                        Found in scripts/core/ui/components/IconMix.tsx and 1 other location - About 1 hr to fix
                        scripts/core/ui/components/IconMix.tsx on lines 37..40

                        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 65.

                        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

                              Watch.prototype.addChangeHandler =
                                function addChangeHandler(name, fn, resolve) {
                                  if (!name || !fn) {
                                    throw new Error('invalid parameters');
                                  }
                        Severity: Major
                        Found in scripts/libs/angular-history/history.js and 4 other locations - About 1 hr to fix
                        scripts/libs/angular-history/history.js on lines 211..217
                        scripts/libs/angular-history/history.js on lines 231..237
                        scripts/libs/angular-history/history.js on lines 251..257
                        scripts/libs/angular-history/history.js on lines 271..277

                        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 65.

                        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

                              Watch.prototype.addRedoHandler =
                                function addRedoHandler(name, fn, resolve) {
                                  if (!name || !fn) {
                                    throw new Error('invalid parameters');
                                  }
                        Severity: Major
                        Found in scripts/libs/angular-history/history.js and 4 other locations - About 1 hr to fix
                        scripts/libs/angular-history/history.js on lines 191..197
                        scripts/libs/angular-history/history.js on lines 211..217
                        scripts/libs/angular-history/history.js on lines 251..257
                        scripts/libs/angular-history/history.js on lines 271..277

                        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 65.

                        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

                              Watch.prototype.addRollbackHandler =
                                function addRollbackHandler(name, fn, resolve) {
                                  if (!name || !fn) {
                                    throw new Error('invalid parameters');
                                  }
                        Severity: Major
                        Found in scripts/libs/angular-history/history.js and 4 other locations - About 1 hr to fix
                        scripts/libs/angular-history/history.js on lines 191..197
                        scripts/libs/angular-history/history.js on lines 211..217
                        scripts/libs/angular-history/history.js on lines 231..237
                        scripts/libs/angular-history/history.js on lines 251..257

                        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 65.

                        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