EVE-Tools/node-43

View on GitHub

Showing 26 of 40 total issues

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

function prepareQueryValues(resultSet) {
  //
  // Prepare parametrized query
  //

Severity: Minor
Found in lib/messagePipeline/orderStore.js - About 1 hr to fix

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

    function upsertRegionStats(resultSet, callback) {
    
      var queryValues = prepareQueryValues(resultSet);
    
      // Get connection from pool
    Severity: Minor
    Found in lib/messagePipeline/orderRegionStats.js - About 1 hr to fix

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

      function upsertRegionStatHistory(resultSet, callback) {
      
        var queryValues = prepareQueryValues(resultSet);
      
        // Get connection from pool
      Severity: Minor
      Found in lib/messagePipeline/orderRegionStatsHistory.js - About 1 hr to fix

        Function handleResponse has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

        function handleResponse(task, callback, error, response, body) {
          //
          // Parse response, filter and store it
          //
        
        
        Severity: Minor
        Found in lib/crestPipeline/crestHistoryAgent.js - About 1 hr 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 prepareQueryValues has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function prepareQueryValues(resultSet) {
          //
          // Prepare parametrized query for history upsert
          //
        
        
        Severity: Minor
        Found in lib/messagePipeline/orderRegionStatsHistory.js - About 1 hr to fix

          Function getOrderObjects has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
          Open

          function getOrderObjects(marketData) {
            //
            // Takes parsed UUDIF messages and converts them into sanitized JS objects
            //
          
          
          Severity: Minor
          Found in lib/emds.js - About 1 hr 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 prepareQueryValues has 39 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function prepareQueryValues(resultSet) {
            //
            // Prepare parametrized query
            //
          
          
          Severity: Minor
          Found in lib/messagePipeline/orderRegionStats.js - About 1 hr to fix

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

            function handleResponse(task, callback, error, response, body) {
              //
              // Parse response, filter and store it
              //
            
            
            Severity: Minor
            Found in lib/crestPipeline/crestHistoryAgent.js - About 1 hr to fix

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

              function getStatisticalInformation(regionID, typeID, callback) {
                //
                // Return statistical properties of given region/type pair
                //
              
              
              Severity: Minor
              Found in lib/messagePipeline/orderProcessor.js - About 1 hr to fix

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

                exports = module.exports = function(resultSet, callback) {
                  //
                  // Reduces dataset to neccessary datapoints missing in DB
                  //
                
                
                Severity: Minor
                Found in lib/crestPipeline/crestHistoryDBFilter.js - About 1 hr to fix

                  Function calculateSums has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function calculateSums(metrics, data) {
                    //
                    // Summarizes ask/bid prices and volumes
                    //
                  
                  
                  Severity: Minor
                  Found in lib/messagePipeline/orderCalculateRegionStats.js - About 1 hr 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 processOrder has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function processOrder(order) {
                    //
                    // Calculate whether order is suspicious which is an arbitrary definition.
                    // Any orders that are outside config.stdDevRejectionMultiplier standard deviations
                    // of the mean AND where there are more than 5 orders of like type in the region will be flagged.
                  Severity: Minor
                  Found in lib/messagePipeline/orderProcessor.js - About 1 hr 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 performCalculations has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function performCalculations(data, prices, callback) {
                    //
                    // Calculates statistical properties of prices
                    //
                  
                  
                  Severity: Minor
                  Found in lib/messagePipeline/orderCalculateRegionStats.js - About 1 hr to fix

                    Function composeQuery has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function composeQuery(objects) {
                    
                      // Concatenate upsert query
                      var query = 'INSERT INTO market_data_orders AS orders (generated_at, ' +
                                    'price, ' +
                    Severity: Minor
                    Found in lib/messagePipeline/orderStore.js - About 1 hr to fix

                      Function prepareQueryValues has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function prepareQueryValues(resultSet) {
                        //
                        // Prepare parametrized query
                        //
                      
                      
                      Severity: Minor
                      Found in lib/crestPipeline/crestHistoryStore.js - About 1 hr to fix

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

                        exports = module.exports = function(message, callback) {
                          //
                          // Inflates and parses the message
                          //
                        
                        
                        Severity: Minor
                        Found in lib/messagePipeline/messageParser.js - About 1 hr to fix

                          Avoid deeply nested control flow statements.
                          Open

                                      if (!error.severity === 0) {
                                        error.module = 'crestHistoryAgentRequest';
                          
                                        // Log Errors
                                        console.error(error);
                          Severity: Major
                          Found in lib/crestPipeline/crestHistoryAgent.js - About 45 mins to fix

                            Function deactivateSelected has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                            function deactivateSelected(resultSet, callback) {
                              //
                              // Deactivate selected orders of region/type pairs in resultSet
                              //
                            
                            
                            Severity: Minor
                            Found in lib/messagePipeline/orderCleanup.js - About 45 mins 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 handleResponse has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            function handleResponse(task, callback, error, response, body) {
                            Severity: Minor
                            Found in lib/crestPipeline/crestHistoryAgent.js - About 35 mins to fix

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

                              exports = module.exports = function(resultSet, callback) {
                                //
                                // Splits multi region/type messages into multiple individual resultSets
                                //
                              
                              
                              Severity: Minor
                              Found in lib/messagePipeline/messageSplitter.js - About 35 mins 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

                              Severity
                              Category
                              Status
                              Source
                              Language