superdesk/superdesk-client-core

View on GitHub

Showing 3,654 of 3,654 total issues

Function WidgetGroup has 13 arguments (exceeds 4 allowed). Consider refactoring.
Open

export function WidgetGroup(search, api, superdesk, desks, cards, $timeout, $q,
    $location, $anchorScroll, activityService: IActivityService, $rootScope, datetime, metadata) {
Severity: Major
Found in scripts/apps/monitoring/directives/WidgetGroup.ts - About 1 hr to fix

    Function RelatedItemController has 13 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        $scope,
        api,
        BaseWidgetController,
        notify,
        superdesk,
    Severity: Major
    Found in scripts/apps/archive/related-item-widget/relatedItem.ts - About 1 hr to fix

      Function UserPreferencesDirective has 13 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          session, preferencesService, notify, asset, metadata, desks, modal,
          $timeout, $q, userList, _, search, authThemes,
      Severity: Major
      Found in scripts/apps/users/directives/UserPreferencesDirective.ts - About 1 hr to fix

        Function getActionsBulkInitialize has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function getActionsBulkInitialize(superdesk: ISuperdesk) {
            const {gettext} = superdesk.localization;
            const {isLocked, isLockedInOtherSession} = superdesk.entities.article;
        
            return function getActionsBulk(articles: Array<IArticle>) {
        Severity: Minor
        Found in scripts/extensions/markForUser/src/get-article-actions-bulk.tsx - About 1 hr to fix

          Function _rollback has 40 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function _rollback(scope, comparisonScope) {
                    var id = scope.$id,
                      comparisonScopeId = comparisonScope.$id,
                      stack = history[id],
                      pointer,
          Severity: Minor
          Found in scripts/libs/angular-history/history.js - About 1 hr to fix

            Function setsReducer has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function setsReducer(
                state: ISetState = initialState,
                action: ISetActionTypes,
            ): ISetState {
                switch (action.type) {
            Severity: Minor
            Found in scripts/extensions/sams/src/store/sets/reducers.ts - About 1 hr to fix

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

                  constructor(props: IProps) {
                      super(props);
              
                      this.state = {
                          fields: null,

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

                    render() {
                        return (
                            <CommentsWidget
                                entityId={this.props.article._id}
                                readOnly={this.props.readOnly}
                Severity: Minor
                Found in scripts/apps/authoring-react/article-widgets/comments/index.tsx - About 1 hr to fix

                  Function queryItems has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              function queryItems(queryString?, params?) {
                                  if (!scope.fetching) {
                                      // page reload disabled when the user scrolls
                                      if (container.scrollTop > 20) {
                                          return;
                  Severity: Minor
                  Found in scripts/apps/monitoring/directives/WidgetGroup.ts - About 1 hr to fix

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

                        render() {
                            const {value, field, remove, onChange, label, readOnly, errors, ...props} = this.props;
                    
                            return (
                                <Row>
                    Severity: Minor
                    Found in scripts/apps/contacts/components/Form/MultiTextInput.tsx - About 1 hr to fix

                      Function save has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          $scope.save = function() {
                              $scope.vocabulary.items = componentRef.getItemsForSaving();
                              $scope._errorUniqueness = false;
                              $scope.errorMessage = null;
                              delete $scope.vocabulary['_deleted'];
                      Severity: Minor
                      Found in scripts/apps/vocabularies/controllers/VocabularyEditController.tsx - About 1 hr to fix

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

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

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

                                  link: function(scope, elem, attr, controller) {
                                      var GRID_VIEW = 'mgrid',
                                          LIST_VIEW = 'compact';
                          
                                      var multiSelectable = attr.multiSelectable !== undefined;
                          Severity: Minor
                          Found in scripts/apps/archive/directives/ContentResults.ts - About 1 hr to fix

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

                                    link: (scope) => {
                                        scope.terms = [];
                            
                                        scope.searchTerms = (name) => {
                                            if (!name) {
                            Severity: Minor
                            Found in scripts/apps/authoring/metadata/MetaPlaceDirective.ts - About 1 hr to fix

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

                                      link: function(scope) {
                                          scope.widget = null;
                                          scope.pinnedWidget = null;
                              
                                          scope.userLookup = desks.userLookup;
                              Severity: Minor
                              Found in scripts/apps/authoring/widgets/widgets.ts - About 1 hr to fix

                                Function TransmissionDetailsDirective has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

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

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

                                          link: function(scope, elem) {
                                              var ENTER = 13;
                                  
                                              scope.focused = false;
                                              var input = elem.find('#search-input');
                                  Severity: Minor
                                  Found in scripts/apps/search/directives/ItemSearchbar.ts - About 1 hr to fix

                                    Function componentDidMount has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        componentDidMount() {
                                            this.fetchData(1, 50).then((res) => {
                                                this.setState({loading: false, initialData: res}, () => {
                                                    this.props.onInitialized();
                                                });

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

                                          render() {
                                              const dayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
                                              const rows = chunk(this.state.dates, 7);
                                      
                                              return (
                                      Severity: Minor
                                      Found in scripts/core/ui/components/Form/DateInput/DayPicker.tsx - About 1 hr to fix

                                        Function generateHtml has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function generateHtml(
                                            store: Store<IEditorStore, AnyAction>,
                                            item: IArticle,
                                            pathToValue: string,
                                        ) {
                                        Severity: Minor
                                        Found in scripts/core/editor3/directive.tsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language