newscoop/JS-Scoopwriter

View on GitHub

Showing 98 of 221 total issues

Function Dragdata has 67 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function Dragdata($log) {
        this.converters = {
            'test': function ($e) {
                return {};
            },
Severity: Major
Found in app/scripts/services/dragData.js - About 2 hrs to fix

    File Author.js has 272 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    'use strict';
    
    /**
    * A factory which creates article author model.
    *
    Severity: Minor
    Found in app/scripts/services/Author.js - About 2 hrs to fix

      Function NestedSort has 63 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function NestedSort($log) {
              var service = this;
              // exposed just for testability
              this.sortByCreated = function (arr) {
                  function getDate(element) {
      Severity: Major
      Found in app/scripts/services/nested-sort.js - About 2 hrs to fix

        File images.js has 262 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        'use strict';
        angular.module('authoringEnvironmentApp').service('images', [
            'pageTracker',
            '$log',
            'article',
        Severity: Minor
        Found in app/scripts/services/images.js - About 2 hrs to fix

          Function changeSelectedStatus has 54 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  self.changeSelectedStatus = function (status, deep, commentId) {
                      var comment = null,
                          displayed = self.displayed, // just an alias
                          i = 0,
                          len = displayed.length,
          Severity: Major
          Found in app/scripts/services/comments.js - About 2 hrs to fix

            Function sort has 52 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    this.sort = function (arr) {
                        var levels = [];
                        var currentLevel = 0;
                        var isOnCurrentLevel = function (element) {
                            return element.thread_level === currentLevel;
            Severity: Major
            Found in app/scripts/services/nested-sort.js - About 2 hrs to fix

              Function responseError has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          responseError: function (response) {
                              var configToRepeat,
                                  failedRequestConfig,
                                  retryDeferred,
                                  userAuth,
              Severity: Minor
              Found in app/scripts/services/auth-interceptor.js - About 1 hr to fix

                Function upload has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        NcImage.upload = function (image, onProgress) {
                            var deferred = $q.defer(),
                                fd = formDataFactory.makeInstance(),
                                parts,
                                rejectMsg = 'No x-location header in API response.';
                Severity: Minor
                Found in app/scripts/services/NcImage.js - About 1 hr to fix

                  Function slide has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    Carousel.prototype.slide = function (type, next) {
                      var $active   = this.$element.find('.item.active')
                      var $next     = next || $active[type]()
                      var isCycling = this.interval
                      var direction = type == 'next' ? 'left' : 'right'
                  Severity: Minor
                  Found in app/scripts/bootstrap.min.js - About 1 hr to fix

                    Function addNewTopicToArticle has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            $scope.addNewTopicToArticle = function (topicData) {
                                var newTopic;
                    
                                $scope.addingNewTopic = true;
                    
                    
                    Severity: Minor
                    Found in app/scripts/controllers/pane-topics.js - About 1 hr to fix

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

                              $scope.addNewSnippetToArticle = function (snippetData) {
                                  var fields = {},
                                      newSnippet;
                      
                                  $scope.addingNewSnippet = true;
                      Severity: Minor
                      Found in app/scripts/controllers/pane-snippets.js - About 1 hr to fix

                        Function liveSearchQuery has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                Topic.liveSearchQuery = function (options, isCallback) {
                                    var isPaginationCall = (options.page > 1),
                                        now = dateFactory.makeInstance(),
                                        url;
                        
                        
                        Severity: Minor
                        Found in app/scripts/services/Topic.js - About 1 hr to fix

                          Function liveSearchQuery has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  Author.liveSearchQuery = function (options, isCallback) {
                                      var isPaginationCall = (options.page > 1),
                                          now = dateFactory.makeInstance(),
                                          url;
                          
                          
                          Severity: Minor
                          Found in app/scripts/services/Author.js - About 1 hr to fix

                            Function setSize has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                            scope.setSize = function (size, initPhase) {
                                                var width;
                            
                                                $parent = findParent();
                                                if (size.match(/^\d+px$/)) {
                            Severity: Minor
                            Found in app/scripts/directives/dropped-image.js - About 1 hr to fix

                              Function imageCommentsToDivs has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      function imageCommentsToDivs(text) {
                                          // the extra backslash (\) is because of Javascript being picky
                                          var imageReg  = '<!';         // exact match
                                          imageReg     += '\\*\\*';    // exact match on **
                                          imageReg     += '[\\s]*';    // optional whitespace
                              Severity: Minor
                              Found in app/scripts/services/Article.js - About 1 hr to fix

                                Function show has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  Tooltip.prototype.show = function () {
                                    var e = $.Event('show.bs.'+ this.type)
                                
                                    if (this.hasContent() && this.enabled) {
                                      this.$element.trigger(e)
                                Severity: Minor
                                Found in app/scripts/bootstrap.min.js - About 1 hr to fix

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

                                          function serializeAlohaBlocks(text) {
                                              var content,
                                                  allMatches,
                                                  sep;
                                  
                                  
                                  Severity: Minor
                                  Found in app/scripts/services/Article.js - About 1 hr to fix

                                    Function addToArticle has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            Author.prototype.addToArticle = function (number, language, roleId) {
                                                var author = this,
                                                    deferred = $q.defer(),
                                                    linkHeader,
                                                    url;
                                    Severity: Minor
                                    Found in app/scripts/services/Author.js - About 1 hr to fix

                                      Function setAlignment has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                                      scope.setAlignment = function (position) {
                                                          var cssFloat,
                                                              cssMargin;
                                      
                                                          switch (position) {
                                      Severity: Minor
                                      Found in app/scripts/directives/dropped-image.js - About 1 hr to fix

                                        Function removeFromArticle has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                Author.prototype.removeFromArticle = function (
                                                    number, language, roleId
                                                ) {
                                                    var author = this,
                                                        deferred = $q.defer(),
                                        Severity: Minor
                                        Found in app/scripts/services/Author.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language