Showing 61 of 2,723 total issues
Avoid too many return
statements within this function. Open
return "<b style='color:#f55; font-weight:inherit'>Command not found. Try /mc:help to get help.</b>";
Avoid too many return
statements within this function. Open
return "Command not defined";
Avoid too many return
statements within this function. Open
return "Ran JS Command";
Avoid too many return
statements within this function. Open
return "Error: Folder already exists";
Avoid too many return
statements within this function. Open
return(`${system.osDetails.name} Version: ${system.osDetails.version}`);
Avoid too many return
statements within this function. Open
return "Created folder";
Avoid too many return
statements within this function. Open
return "'(Ancient variable, use settings menu) <br>' + Error: Setting not found";
Avoid too many return
statements within this function. Open
return "'(Ancient variable, use settings menu) <br>' + changed setting - a reload may be required";
Avoid too many return
statements within this function. Open
return "iofs:C:/system/icons/unknown_file.svg";
Avoid too many return
statements within this function. Open
return "";
Avoid too many return
statements within this function. Open
return ("(Ancient variable, use settings menu) <br>" + which + ": " + iofs.load(system.user.paths.userPath + "settings/" + which.split(" ")[0] + ".txt"));
Avoid too many return
statements within this function. Open
return "";
Avoid too many return
statements within this function. Open
return result;
Function deletefile
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function deletefile(path, includeChildren = false) { // Delete a file or folder
console.warn("IOFS1: deletefile(", path, includeChildren , ")");
// check if file or folder exists, else return error
if(!isfile(path) && !isfolder(path)) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function setAttribute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function setAttribute(path, attribute, value) {
console.warn("IOFS1: setAttribute(", path, attribute, value , ")");
var myAttributes = getAttributes(path);
var myNewAttributes = "";
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function save
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
save: function(path, content, attributes = false, override = false, recursive = false) {
path = this.sanitizePath(path);
if(!this.isAllowedPath(path)) {
return false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function createNotificationIcon
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function createNotificationIcon() {
if(parent.document.getElementById("taskbarrighticons")) {
if(!parent.document.getElementById("notifications")) {
let notificationIconTemp = document.createElement("a");
notificationIconTemp.id = "notifications";
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getWindowByMagic
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function getWindowByMagic(which) {
var result;
if(result == undefined || result == null || result == "") {
result = getWindowByPid(which);
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function isfolder
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function isfolder(path) {
console.warn("IOFS1: isfolder(", path , ")");
if(!path.endsWith("/")) { // Add trailing slash if not present
path += "/";
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function register
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function register() {
if(os?.document.getElementById("taskbar")) {
if(!os.document.getElementById("start")) {
let startButton = document.createElement("button");
startButton.id = "start";
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"