matiasmenares/Nissboard

View on GitHub
server/server.js

Summary

Maintainability
B
4 hrs
Test Coverage

Showing 3 of 3 total issues

Function function_interval has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

const function_interval = (socket) => {
if (process.env.NODE_ENV === "development"){
if(rpm < 7200){
rpm += 220
} else{
Severity: Minor
Found in server/server.js - About 2 hrs to fix

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

const function_interval = (socket) => {
if (process.env.NODE_ENV === "development"){
if(rpm < 7200){
rpm += 220
} else{
Severity: Minor
Found in server/server.js - About 1 hr to fix

    Function handleData has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

    function handleData(data, bytesExpected){
    // create an array of the size of requested data length and fill with requested data
    for(var i = 0; i < data.length; i++){
    // read just 1 byte at a time of the stream
    var char = data.toString('hex',i,i+1);
    Severity: Minor
    Found in server/server.js - About 55 mins to fix
    Category
    Status