ltgcgo/octavia

View on GitHub
src/state/bankDecoder.js

Summary

Maintainability
D
2 days
Test Coverage

Showing 4 of 4 total issues

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

for (let i = 0; i < 128; i ++) {
let entryStart = i * section.entryLen;
let entryWin = sectWin.subarray(entryStart, entryStart + section.entryLen);
let name = utf8Dec.decode(entryWin.subarray(0, 24)).trimEnd().replace("InitProg", "");
if (name.length && prg > 5) {
Severity: Major
Found in src/state/bankDecoder.js and 1 other location - About 1 day to fix
src/state/bankDecoder.js on lines 176..183

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

for (let i = 0; i < 128; i ++) {
let entryStart = i * section.entryLen;
let entryWin = sectWin.subarray(entryStart, entryStart + section.entryLen);
let name = utf8Dec.decode(entryWin.subarray(0, 24)).trimEnd().replace("InitCombi", "");
if (name.length && prg > 12) {
Severity: Major
Found in src/state/bankDecoder.js and 1 other location - About 1 day to fix
src/state/bankDecoder.js on lines 164..171

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

if (voiceName) {
voiceMap += `\n063 ${(entryWin[17] + 13).toString().padStart(3, "0")} ${entryWin[19].toString().padStart(3, "0")} ${voiceName}`;
};
Severity: Major
Found in src/state/bankDecoder.js and 1 other location - About 2 hrs to fix
src/state/bankDecoder.js on lines 105..107

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

if (voiceName) {
voiceMap += `\n063 ${(entryWin[17] + 1).toString().padStart(3, "0")} ${entryWin[19].toString().padStart(3, "0")} ${voiceName}`;
};
Severity: Major
Found in src/state/bankDecoder.js and 1 other location - About 2 hrs to fix
src/state/bankDecoder.js on lines 73..75
Category
Status