e-ucm/rage-analytics-backend

View on GitHub

Showing 244 of 590 total issues

Function exports has 797 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = (function () {
    var Q = require('q');
    var request = require('request');
    var kibana = {};
    var async = require('async');
Severity: Major
Found in lib/kibana/kibana.js - About 3 days to fix

    Function exports has 752 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = function (request, db, config) {
    
        /**-------------------------------------------------------------**/
        /**-------------------------------------------------------------**/
        /**                   Test Tracker                              **/
    Severity: Major
    Found in test/tests/collectorTest.js - About 3 days to fix

      Function exports has 639 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = (function () {
          var Q = require('q');
          var Collection = require('easy-collections');
          var async = require('async');
          var db = require('./db');
      Severity: Major
      Found in lib/activities.js - About 3 days to fix

        Function exports has 527 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        module.exports = (function () {
            var Q = require('q');
            var Collection = require('easy-collections');
            var async = require('async');
            var db = require('./db');
        Severity: Major
        Found in lib/classes.js - About 2 days to fix

          File tracesConverterTest.js has 934 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*
           * Copyright 2016 e-UCM (http://www.e-ucm.es/)
           *
           * Licensed under the Apache License, Version 2.0 (the "License");
           * you may not use this file except in compliance with the License.
          Severity: Major
          Found in test/tests/tracesConverterTest.js - About 2 days to fix

            File transformToVersion2.js has 905 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*
             * Copyright 2016 e-UCM (http://www.e-ucm.es/)
             *
             * Licensed under the Apache License, Version 2.0 (the "License");
             * you may not use this file except in compliance with the License.
            Severity: Major
            Found in bin/upgrade/transformers/elastic/transformToVersion2.js - About 2 days to fix

              Function exports has a Cognitive Complexity of 97 (exceeds 5 allowed). Consider refactoring.
              Open

              module.exports = (function () {
                  var Q = require('q');
                  var Collection = require('easy-collections');
                  var async = require('async');
                  var db = require('./db');
              Severity: Minor
              Found in lib/activities.js - About 1 day to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              File kibana.js has 800 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              'use strict';
              
              module.exports = (function () {
                  var Q = require('q');
                  var request = require('request');
              Severity: Major
              Found in lib/kibana/kibana.js - About 1 day to fix

                File collectorTest.js has 766 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /*
                 * Copyright 2016 e-UCM (http://www.e-ucm.es/)
                 *
                 * Licensed under the Apache License, Version 2.0 (the "License");
                 * you may not use this file except in compliance with the License.
                Severity: Major
                Found in test/tests/collectorTest.js - About 1 day to fix

                  File exampleTo4OUT.js has 718 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  // jscs:disable requireCamelCaseOrUpperCaseIdentifiers
                  'use strict';
                  
                  var ObjectID = require('mongodb').ObjectID;
                  
                  
                  Severity: Major
                  Found in test/upgraderTests/mongo/upgradeOutputs/exampleTo4OUT.js - About 1 day to fix

                    Function exports has 317 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    module.exports = function (request, db) {
                    
                        /**-------------------------------------------------------------**/
                        /**-------------------------------------------------------------**/
                        /**                   Test Classes  API                         **/
                    Severity: Major
                    Found in test/tests/classesTest.js - About 1 day to fix

                      Function exports has 308 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      module.exports = function () {
                      
                          var collector = require('./collector');
                          var csvToXapi = require('./csvToXAPI');
                          var Q = require('q');
                      Severity: Major
                      Found in lib/offlinetraces.js - About 1 day to fix

                        Function exports has 303 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        module.exports = function (app, esClient, mongo) {
                        
                            /**-------------------------------------------------------------**/
                            /**-------------------------------------------------------------**/
                            /**              Test Elastic Transformer To v2                 **/
                        Severity: Major
                        Found in test/upgraderTests/elastic/elasticTransformerTo2.js - About 1 day to fix

                          File activities.js has 642 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          'use strict';
                          
                          module.exports = (function () {
                              var Q = require('q');
                              var Collection = require('easy-collections');
                          Severity: Major
                          Found in lib/activities.js - About 1 day to fix

                            Function exports has 275 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            module.exports = function (request, db) {
                            
                                /**-------------------------------------------------------------**/
                                /**-------------------------------------------------------------**/
                                /**                   Test Sessions API                         **/
                            Severity: Major
                            Found in test/tests/activitiesTest.js - About 1 day to fix

                              Function exports has 271 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              module.exports = (function () {
                                  var Collection = require('easy-collections');
                                  var db = require('./db');
                                  var utils = require('./utils');
                                  var groups = new Collection(db, 'groups');
                              Severity: Major
                              Found in lib/groups.js - About 1 day to fix

                                Function exports has 260 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                module.exports = (function () {
                                    var Q = require('q');
                                    var Collection = require('easy-collections');
                                    var db = require('./db');
                                    var analysis = new Collection(db, 'analysis');
                                Severity: Major
                                Found in lib/analysis.js - About 1 day to fix

                                  Function exports has 247 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  module.exports = (function () {
                                      var Q = require('q');
                                      var Collection = require('easy-collections');
                                      var db = require('./db');
                                      var games = new Collection(db, 'games');
                                  Severity: Major
                                  Found in lib/games.js - About 1 day to fix

                                    Function exports has 245 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    module.exports = (function () {
                                        var Collection = require('easy-collections');
                                        var db = require('./db');
                                        var utils = require('./utils');
                                        var groups = require('./groups');
                                    Severity: Major
                                    Found in lib/groupings.js - About 1 day to fix

                                      Function exports has 239 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      module.exports = function (request, db) {
                                      
                                          /**-------------------------------------------------------------**/
                                          /**-------------------------------------------------------------**/
                                          /**                   Test Analysis API                         **/
                                      Severity: Major
                                      Found in test/tests/analysisTest.js - About 1 day to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language