Showing 10 of 20 total issues
File csgo-data-parser.js
has 516 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
/* jshint node: true */
//Correct vdf for little endian handle ?
var vdf = require('vdf'),
CSGODataParser
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class CSGODataParser {
constructor(schemaFilePath, langFilePath, itemsFilePath, logLevel, logFilePath) {
this.schemaFilePath = schemaFilePath;
this.langFilePath = langFilePath;
Function getCollections
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getCollections(indexed) {
/*jshint camelcase: false */
var self = this;
var timer = misc.generateTimer();
self.logger.info('');
Function getStickers
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getStickers(indexed) {
/*jshint eqeqeq: false, eqnull:true, camelcase: false */
var self = this;
var timer = misc.generateTimer();
self.logger.info('');
Function getWeapons
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getWeapons(indexed) {
/*jshint camelcase: false */
var self = this;
var timer = misc.generateTimer();
self.logger.info('');
Function getRarities
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getRarities(indexed) {
/*jshint camelcase: false */
var self = this;
var timer = misc.generateTimer();
self.logger.info('');
Function _getSkinsByWeapon
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_getSkinsByWeapon(techName, type, indexed) {
/*jshint camelcase: false */
var self = this;
var skins;
var icons = this.itemsData.items_game.alternate_icons2.weapon_icons;
Function getMusicKits
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getMusicKits(indexed) {
/*jshint camelcase: false */
var self = this;
var timer = misc.generateTimer();
self.logger.info('');
Function _getItemsByPrefabViaSchema
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_getItemsByPrefabViaSchema(prefab, type, indexed) {
/*jshint camelcase: false */
var self = this;
var timer = misc.generateTimer();
var itemsReturn;
Function getCases
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
getCases(indexed) {
var self = this;
self.logger.info('');
self.logger.info('');
- Read upRead up
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"