superdesk/superdesk-client-core

View on GitHub
scripts/extensions/markForUser/src/get-article-actions-bulk.tsx

Summary

Maintainability
A
3 hrs
Test Coverage

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

      There are no issues that match your filters.

      Category
      Status