Function run
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
run: function(url, success, failure, timeout, additionalHeader) {
if(!idrinth.start && idrinth.settings.get("server")) {
return;
}
let requestHandler = new XMLHttpRequest();
- Read upRead up
- Create a ticketCreate a ticket
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
File core.js
has 295 lines of code (exceeds 250 allowed). Consider refactoring. Open
idrinth.core = {
/**
*
* @param {string} str
* @returns {string}
- Create a ticketCreate a ticket
Function process
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
process: function() {
let date = new Date().getTime() + new Date().getMilliseconds() / 1000;
let min = 10;
/**
*
- Read upRead up
- Create a ticketCreate a ticket
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 run
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
run: function(url, success, failure, timeout, additionalHeader) {
if(!idrinth.start && idrinth.settings.get("server")) {
return;
}
let requestHandler = new XMLHttpRequest();
- Create a ticketCreate a ticket
Function triggered
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
triggered: function(event) {
/**
*
* @param {HTMLElement} el
* @param {string} event
- Read upRead up
- Create a ticketCreate a ticket
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 process
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
process: function() {
let date = new Date().getTime() + new Date().getMilliseconds() / 1000;
let min = 10;
/**
*
- Create a ticketCreate a ticket
Function triggered
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
triggered: function(event) {
/**
*
* @param {HTMLElement} el
* @param {string} event
- Create a ticketCreate a ticket
Function check
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
let check = function(min, property, date) {
/**
*
* @param {Number} durationLeft
* @param {string} minDuration
- Create a ticketCreate a ticket
Function onreadystatechange
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
requestHandler.onreadystatechange = function(event) {
let request = (event || window.event).target;
let call = function(func, value) {
if (typeof func !== "function") {
return;
- Create a ticketCreate a ticket
Function runHome
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
url,
success,
failure,
timeout,
additionalHeader,
- Create a ticketCreate a ticket
Function run
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
run: function(url, success, failure, timeout, additionalHeader) {
- Create a ticketCreate a ticket