junebug12851/pokered-save-editor

View on GitHub
electron/AppMenu.js

Summary

Maintainability
B
4 hrs
Test Coverage

Showing 4 of 4 total issues

Function _rebuildMenu has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

_rebuildMenu(arr) {
for (var i = 0; i < arr.length; i++) {
const obj = arr[i];
 
// Is not designated platform
Severity: Minor
Found in electron/AppMenu.js - About 2 hrs to fix

Function _rebuildMenu has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

_rebuildMenu(arr) {
for (var i = 0; i < arr.length; i++) {
const obj = arr[i];
 
// Is not designated platform
Severity: Minor
Found in electron/AppMenu.js - About 1 hr to fix

Avoid too many return statements within this function.
Open

return false;
Severity: Major
Found in electron/AppMenu.js - About 30 mins to fix

Function doMenuItemSkip has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

doMenuItemSkip(obj) {
// Is it not the wrong platform
if (obj.platform !== undefined &&
process.platform !== obj.platform)
return true;
Severity: Minor
Found in electron/AppMenu.js - About 25 mins to fix
Category
Status