Showing 13 of 13 total issues
Function onSteamLogOn
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
var onSteamLogOn = function onSteamLogOn(response){
if (response.eresult == Steam.EResult.OK) {
util.log('Logged in!');
}
else
Function CSGOClient
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
var CSGOClient = function CSGOClient(steamUser, steamGC, debug) {
EventEmitter.call(this);
this.debug = debug || false;
this._user = steamUser;
Function decoded_code
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
get decoded_code() {
var self = this;
var result = new Array(18).fill(0);
var reversed = this.code.split('').reverse();
reversed.forEach(function(char, index) {
Function decode
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.decode = function(buffer) {
var object = {};
if(typeof(buffer.readUint8) != "function"){
buffer = ByteBuffer.wrap(buffer);
}
Function CSGOClient
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
var CSGOClient = function CSGOClient(steamUser, steamGC, debug) {
EventEmitter.call(this);
this.debug = debug || false;
this._user = steamUser;
- 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"
Further reading
Function decode
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
exports.decode = function(buffer) {
var object = {};
if(typeof(buffer.readUint8) != "function"){
buffer = ByteBuffer.wrap(buffer);
}
- 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"
Further reading
Function requestRecentGames
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
CSGO.CSGOClient.prototype.requestRecentGames = function(arg1, arg2) {
if (!this._gcReady) {
if (this.debug) {
util.log("GC not ready");
}
Function requestRecentGames
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
CSGO.CSGOClient.prototype.requestRecentGames = function(arg1, arg2) {
if (!this._gcReady) {
if (this.debug) {
util.log("GC not ready");
}
- 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"
Further reading
Function gcClientConnectionStatus
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
handlers[protos.GC.CSGO.Internal.EGCBaseClientMsg.k_EMsgGCClientConnectionStatus] = function gcClientConnectionStatus(message) {
/* Catch and handle changes in connection status, cuz reasons u know. */
var status = protos.GC.CSGO.Internal.CMsgConnectionStatus.decode(message).status;
- 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"
Further reading
Function requestGame
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
CSGO.CSGOClient.prototype.requestGame = function(matchid, outcome, token, callback) {
callback = callback || null;
if (!this._gcReady) {
if (this.debug) {
util.log("GC not ready");
- 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"
Further reading
Function onSteamLogOn
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
var onSteamLogOn = function onSteamLogOn(response){
if (response.eresult == Steam.EResult.OK) {
util.log('Logged in!');
}
else
- 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"
Further reading
Function playerProfileRequest
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
CSGO.CSGOClient.prototype.playerProfileRequest = function(accountId, req_level, callback) {
callback = callback || null;
if (!this._gcReady) {
if (this.debug) {
util.log("GC not ready");
- 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"
Further reading
Function _encode
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function _encode(object, buffer, name){
switch (typeof object) {
case 'object':
buffer.writeByte(Type.None);
buffer.writeCString(name);
- 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"