matiasmenares/Nissboard

View on GitHub
server/public/app.jsx

Summary

Maintainability
C
7 hrs
Test Coverage

Showing 6 of 6 total issues

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

renderSmallNumbers: function (number) {
var rpm = number;
var thousands = "small-number small-number";
var hundreds = "small-number small-number";
var tens = "small-number small-number";
Severity: Minor
Found in server/public/app.jsx - About 1 hr to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    backgroundTempMarkers: function () {
    var tempMarkers = []
    for (var i = 0; i < 20; i++) {
    tempMarkers.push(this.tempMarker(i, true));
    }
    Severity: Major
    Found in server/public/app.jsx and 1 other location - About 1 hr to fix
    server/public/app.jsx on lines 38..44

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    backgroundMarkers: function () {
    var rpmMarkers = []
    for (var i = 0; i < 75; i++) {
    rpmMarkers.push(this.rpmMarker(i, true));
    }
    Severity: Major
    Found in server/public/app.jsx and 1 other location - About 1 hr to fix
    server/public/app.jsx on lines 141..147

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    <li className='rpm-column'>
    { this.renderSmallNumbers(this.state.rpm) }
    <p className="small-number__label">RPM</p>
    </li>
    Severity: Major
    Found in server/public/app.jsx and 2 other locations - About 1 hr to fix
    server/public/app.jsx on lines 157..160
    server/public/app.jsx on lines 178..181

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    <div className="small-num__container">
    { this.renderSmallNumbers(this.state.rpm) }
    <p className="small-number__label">RPM</p>
    </div>
    Severity: Major
    Found in server/public/app.jsx and 2 other locations - About 1 hr to fix
    server/public/app.jsx on lines 171..174
    server/public/app.jsx on lines 178..181

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    <li className='temp-column'>
    { this.renderSmallNumbers(this.state.coolantTemp) }
    <p className="small-number__label">Coolant Temp</p>
    </li>
    Severity: Major
    Found in server/public/app.jsx and 2 other locations - About 1 hr to fix
    server/public/app.jsx on lines 157..160
    server/public/app.jsx on lines 171..174

    There are no issues that match your filters.

    Category
    Status