src/mods/raids.js
Function process
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
Open
process: function() {
/**
*
* @returns {Boolean}
*/
- 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 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
process: function() {
/**
*
* @returns {Boolean}
*/
- Create a ticketCreate a ticket
File raids.js
has 326 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
idrinth.raids = {
/**
* @type Object
*/
list: {},
- Create a ticketCreate a ticket
Function join
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
let join = function() {
/**
*
* @returns {function[]}
*/
- Create a ticketCreate a ticket
Function getServerLink
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getServerLink: function(key) {
/**
*
* @param {Object} list
* @param {String} key
- Create a ticketCreate a ticket
Function getServerLink
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
Open
getServerLink: function(key) {
/**
*
* @param {Object} list
* @param {String} key
- 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 getServerMethods
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
let getServerMethods = function() {
/**
*
* @param {String} key
* @returns {Function}
- Create a ticketCreate a ticket
Function import
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
import: function(id) {
if (!idrinth.platform) {
return;
}
/**
- Create a ticketCreate a ticket
Function handlePrivates
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
let handlePrivates = function() {
/**
*
* @param {String} reply
* @returns {undefined}
- Create a ticketCreate a ticket
Function getLink
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
let getLink = function(list, key, prefix, tag) {
let build = function(data, tag, prefix) {
try {
return (
prefix +
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
Open
if (
((!idrinth.settings.get("bannedRaids#" + raid.raid) &&
!idrinth.settings.get("raidWhitelist")) ||
(idrinth.settings.get("bannedRaids#" + raid.raid) &&
idrinth.settings.get("raidWhitelist"))) &&
- Create a ticketCreate a ticket