Showing 162 of 178 total issues
Function updateData
has 189 lines of code (exceeds 25 allowed). Consider refactoring. Open
let updateData = function(data) {
/**
*
* @param {object} data
* @returns {undefined}
- Create a ticketCreate a ticket
Function process
has 185 lines of code (exceeds 25 allowed). Consider refactoring. Open
let process = function(data) {
/**
*
* @param {Boolean} onOff
* @returns {undefined}
- Create a ticketCreate a ticket
Function start
has 185 lines of code (exceeds 25 allowed). Consider refactoring. Open
start: function() {
/**
* creates the tooltip-element
* @returns {undefined}
*/
- Create a ticketCreate a ticket
Function handle
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
handle: function(mutations, isPrivate) {
/**
*
* @param {HTMLElement} element
* @returns {undefined}
- 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 addMessages
has 159 lines of code (exceeds 25 allowed). Consider refactoring. Open
let addMessages = function(chatMessages, chatId, chatElement) {
/**
*
* @param {String} message
* @param {HTMLElement} chat
- Create a ticketCreate a ticket
Function calculate
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
calculate: function() {
/**
*
* @param {function[]} checkElementFunc
* @returns {object}
- 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 processJson
has 146 lines of code (exceeds 25 allowed). Consider refactoring. Open
let processJson = function(data) {
let magicIgmSrv =
"https://dotd.idrinth.de/static/magic-image-service/";
/**
*
- Create a ticketCreate a ticket
Function buildMessage
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
let buildMessage = function(message, chat, chatId, messageId) {
/**
*
* @returns {String}
*/
- Create a ticketCreate a ticket
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
Function buildLand
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
let buildLand = function() {
/**
*
* @param {string} label
* @returns {object}
- Create a ticketCreate a ticket
Function userclick
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
userclick: function(element, user, chat) {
if (
!idrinth.chat.chatRank[chat][idrinth.chat.self] ||
parseInt(user, 10) === parseInt(idrinth.chat.self, 10)
) {
- Create a ticketCreate a ticket
Function process
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
process: function() {
/**
*
* @returns {Boolean}
*/
- Create a ticketCreate a ticket
Function buildElement
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
buildElement: function(config) {
/**
*
* @param {HTMLElement} el
* @param {object} config
- Create a ticketCreate a ticket
Function build
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
let build = function() {
/**
*
* @param {string} name
* @returns {Array}
- Create a ticketCreate a ticket
Function tiers
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
tiers: function(list) {
/**
*
* @param {HTMLElement} elem
* @returns {undefined}
- 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 calculate
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
calculate: function() {
/**
*
* @param {function[]} checkElementFunc
* @returns {object}
- Create a ticketCreate a ticket
Function buildStats
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
let buildStats = function() {
/**
*
* @param {string} label
* @returns {object}
- Create a ticketCreate a ticket
Function userclick
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
userclick: function(element, user, chat) {
if (
!idrinth.chat.chatRank[chat][idrinth.chat.self] ||
parseInt(user, 10) === parseInt(idrinth.chat.self, 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
File raids.js
has 326 lines of code (exceeds 250 allowed). Consider refactoring. Open
idrinth.raids = {
/**
* @type Object
*/
list: {},
- Create a ticketCreate a ticket
Function replaceInText
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
replaceInText: function(message, regex, callbacks, lastField) {
/**
*
* @param {String} message
* @param {RegExp} regex
- 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"