Ballrock/node-csgo-parser

View on GitHub

Showing 10 of 20 total issues

File csgo-data-parser.js has 516 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';
/* jshint node: true */

//Correct vdf for little endian handle ?
var vdf = require('vdf'),
Severity: Major
Found in src/csgo-data-parser.js - About 1 day to fix

    CSGODataParser has 30 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class CSGODataParser {
    
        constructor(schemaFilePath, langFilePath, itemsFilePath, logLevel, logFilePath) {
            this.schemaFilePath = schemaFilePath;
            this.langFilePath = langFilePath;
    Severity: Minor
    Found in src/csgo-data-parser.js - About 3 hrs to fix

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

          getCollections(indexed) {
              /*jshint camelcase: false */
              var self = this;
              var timer = misc.generateTimer();
              self.logger.info('');
      Severity: Minor
      Found in src/csgo-data-parser.js - About 1 hr to fix

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

            getStickers(indexed) {
                /*jshint eqeqeq: false, eqnull:true, camelcase: false */
                var self = this;
                var timer = misc.generateTimer();
                self.logger.info('');
        Severity: Minor
        Found in src/csgo-data-parser.js - About 1 hr to fix

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

              getWeapons(indexed) {
                  /*jshint camelcase: false */
                  var self = this;
                  var timer = misc.generateTimer();
                  self.logger.info('');
          Severity: Minor
          Found in src/csgo-data-parser.js - About 1 hr to fix

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

                getRarities(indexed) {
                    /*jshint camelcase: false */
                    var self = this;
                    var timer = misc.generateTimer();
                    self.logger.info('');
            Severity: Minor
            Found in src/csgo-data-parser.js - About 1 hr to fix

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

                  _getSkinsByWeapon(techName, type, indexed) {
                      /*jshint camelcase: false */
                      var self = this;
                      var skins;
                       var icons = this.itemsData.items_game.alternate_icons2.weapon_icons;
              Severity: Minor
              Found in src/csgo-data-parser.js - About 1 hr to fix

                Function getMusicKits has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    getMusicKits(indexed) {
                        /*jshint camelcase: false */
                        var self = this;
                        var timer = misc.generateTimer();
                        self.logger.info('');
                Severity: Minor
                Found in src/csgo-data-parser.js - About 1 hr to fix

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

                      _getItemsByPrefabViaSchema(prefab, type, indexed) {
                          /*jshint camelcase: false */
                          var self = this;
                          var timer = misc.generateTimer();
                          var itemsReturn;
                  Severity: Minor
                  Found in src/csgo-data-parser.js - About 1 hr to fix

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

                        getCases(indexed) {
                            var self = this;
                            
                            self.logger.info('');
                            self.logger.info('');
                    Severity: Minor
                    Found in src/csgo-data-parser.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

                    Severity
                    Category
                    Status
                    Source
                    Language