RescueOnWheels/Cockpit

View on GitHub

Showing 4 of 5 total issues

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

module.exports = (socket, controller) => {
let speed = 0;
let direction = 2;
let balance = 0;
 
 
Severity: Major
Found in lib/controllers/movement.js - About 4 hrs to fix

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

    module.exports = (socket, controller) => {
    socket.token = '';
     
    socket.on('authenticate', (cb) => {
    if (socket.token.length === 4 && socket.call !== undefined) {
    Severity: Minor
    Found in lib/controllers/authentication.js - About 1 hr to fix

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

      module.exports = (socket) => {
      let attempts = 0;
       
      socket.on('connect', () => {
      debug('Connected');
      Severity: Minor
      Found in lib/controllers/connection.js - About 1 hr to fix

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

        module.exports = (socket, controller) => {
        let speed = 0;
        let direction = 2;
        let balance = 0;
         
         
        Severity: Minor
        Found in lib/controllers/movement.js - About 55 mins to fix
        Severity
        Category
        Status
        Source
        Language