e-ucm/rage-analytics-backend

View on GitHub

Showing 244 of 590 total issues

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

module.exports = function (kafkaService, stormService) {

    /**
     * @api {get} /activities Returns the Activities.
     * @apiName GetActivities
Severity: Major
Found in routes/activities.js - About 1 day to fix

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

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

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

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

        File classes.js has 530 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/classes.js - About 1 day to fix

          File exampleTo4IN.js has 524 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/upgradeInputs/exampleTo4IN.js - About 1 day to fix

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

            module.exports = (function () {
                var Q = require('q');
                var request = require('request');
                var kibana = {};
                var async = require('async');
            Severity: Minor
            Found in lib/kibana/kibana.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

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

            module.exports = function (request, db) {
            
                /**-------------------------------------------------------------**/
                /**-------------------------------------------------------------**/
                /**                   Test Groups  API                          **/
            Severity: Major
            Found in test/tests/groupsTest.js - About 7 hrs to fix

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

              module.exports = function (request, db) {
              
                  /**-------------------------------------------------------------**/
                  /**-------------------------------------------------------------**/
                  /**                   Test Offlinetraces API                    **/
              Severity: Major
              Found in test/tests/offlinetracesTest.js - About 7 hrs to fix

                Function exports has a Cognitive Complexity of 47 (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/classes.js - About 7 hrs 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

                Function exports has a Cognitive Complexity of 46 (exceeds 5 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: Minor
                Found in lib/groups.js - About 7 hrs 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

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

                module.exports = function (request, app, db) {
                
                
                    /**-------------------------------------------------------------**/
                    /**-------------------------------------------------------------**/
                Severity: Major
                Found in test/upgraderTests/processController.js - About 6 hrs to fix

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

                  module.exports = function () {
                  
                      var collector = require('./collector');
                      var csvToXapi = require('./csvToXAPI');
                      var Q = require('q');
                  Severity: Minor
                  Found in lib/offlinetraces.js - About 6 hrs 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

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

                  module.exports = function (request, db) {
                  
                      /**-------------------------------------------------------------**/
                      /**-------------------------------------------------------------**/
                      /**                   Test Courses  API                         **/
                  Severity: Major
                  Found in test/tests/coursesTest.js - About 6 hrs to fix

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

                    'use strict';
                    
                    var express = require('express'),
                        router = express.Router(),
                        restUtils = require('./rest-utils'),
                    Severity: Minor
                    Found in routes/kibana.js - About 6 hrs to fix

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

                      module.exports = function (request, db) {
                      
                          /**-------------------------------------------------------------**/
                          /**-------------------------------------------------------------**/
                          /**                   Test Groupings  API                       **/
                      Severity: Major
                      Found in test/tests/groupingsTest.js - About 6 hrs to fix

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

                        module.exports = (function () {
                            var Q = require('q');
                            var Collection = require('easy-collections');
                            var gameplays = {};
                        
                        
                        Severity: Major
                        Found in lib/gameplays.js - About 6 hrs to fix

                          Function toStatement has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
                          Open

                          var toStatement = function (statement, trace) {
                          
                              var parts = parseCSV(trace);
                          
                              var username = parts[0];
                          Severity: Minor
                          Found in lib/csvToXAPI.js - About 5 hrs 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

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

                          module.exports = function (app, esClient, mongo) {
                          
                              /**-------------------------------------------------------------**/
                              /**-------------------------------------------------------------**/
                              /**              Test Elastic Controller                        **/
                          Severity: Major
                          Found in test/upgraderTests/elastic/elasticController.js - About 5 hrs to fix

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

                            module.exports = function (request, db, config) {
                                config.mongodb.db = db;
                            
                                /**-------------------------------------------------------------**/
                                /**-------------------------------------------------------------**/
                            Severity: Major
                            Found in test/upgraderTests/mongo/mongoTransformerTo4.js - About 5 hrs to fix

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

                              module.exports = function (request, db, config) {
                                  config.mongodb.db = db;
                              
                                  /**-------------------------------------------------------------**/
                                  /**-------------------------------------------------------------**/
                              Severity: Major
                              Found in test/upgraderTests/mongo/mongoTransformerTo2.js - About 5 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language