newscoop/JS-Scoopwriter

View on GitHub
app/scripts/controllers/pane-authors.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function confirmRemoveAuthor has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        $scope.confirmRemoveAuthor = function (author) {
            var modal,
                title,
                text;

Severity: Minor
Found in app/scripts/controllers/pane-authors.js - About 1 hr to fix

    Function authorRoleChanged has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            self.authorRoleChanged = function (newRole, oldRole, author) {
                author.updatingRole = true;
    
                author.updateRole({
                    number: article.articleId,
    Severity: Minor
    Found in app/scripts/controllers/pane-authors.js - About 1 hr to fix

      Function addAuthorToArticle has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              $scope.addAuthorToArticle = function () {
                  // NOTE: An author can be added multiple times (with different
                  // roles), therefore we need multiple deep copies of the object to
                  // distinguish between them in $scope.authors ng-repeat.
                  var author = angular.copy($scope.newAuthor),
      Severity: Minor
      Found in app/scripts/controllers/pane-authors.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status