Showing 162 of 178 total issues
File workers.js
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
idrinth.workers = {
list: '###WORKERS###',
result: {
/**
* @param {string} list
- Create a ticketCreate a ticket
Function refreshMembers
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
let refreshMembers = function() {
/**
*
* @param {String} data
* @returns {undefined}
- Create a ticketCreate a ticket
Function makeInputLabel
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
let makeInputLabel = function(config) {
/**
*
* @param {String|Number} value
* @param {Array} list
- Create a ticketCreate a ticket
Function replaceInText
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
replaceInText: function(message, regex, callbacks, lastField) {
/**
*
* @param {String} message
* @param {RegExp} regex
- Create a ticketCreate a ticket
Function applyMembers
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
let applyMembers = function(data) {
/**
*
* @returns {undefined}
*/
- Create a ticketCreate a ticket
Function showOptions
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
showOptions: function(event, element) {
event.preventDefault();
idrinth.ui.base.appendChild(
idrinth.ui.buildElement({
type: "ul",
- Create a ticketCreate a ticket
Function baseCalculator
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
let baseCalculator = function(checkElementFunc) {
let factor = idrinth.settings.get("factor") ? 10 : 1;
/**
*
* @param {string} building
- Create a ticketCreate a ticket
Function make
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
let make = function(x, name) {
let makeElement = function(label, number, description) {
return {
content: label + " " + idrinth.ui.formatNumber(number),
attributes: [
- Create a ticketCreate a ticket
Function start
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
start: function() {
/**
* @returns {undefined}
*/
let reload = function(data) {
- Create a ticketCreate a ticket
Function buildRaidJoinList
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
let buildRaidJoinList = function() {
/**
*
* @param {Array} list
* @param {String} header
- Create a ticketCreate a ticket
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 newBoss
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function newBoss(data, boss) {
idrinth.war.element.childNodes[1].appendChild(
idrinth.ui.buildElement({
type: "tr",
id: "idrinth-war-" + boss,
- Create a ticketCreate a ticket
chat
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
idrinth.chat = {
/**
* own user id
* @type Number
*/
- Create a ticketCreate a ticket
Function sendAlive
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
let sendAlive = function() {
/**
*
* @returns {String|idrinth.user.identifier}
*/
- Create a ticketCreate a ticket
Function buildModal
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
buildModal: function(title, content, altFunc) {
let mod = {
children: [],
css: "idrinth-hovering-box idrinth-popup idrinth-" +
(typeof altFunc === "string" ? "confim" : "alert")
- Create a ticketCreate a ticket
Function notify
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
let notify = function(message, own, chatId) {
/**
*
* @param {Number} chatId
* @returns {Boolean}
- Create a ticketCreate a ticket
Function getServerLink
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. 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 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 start
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
start: function() {
/**
* @returns {undefined}
*/
let reload = function(data) {
- 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 showTooltip
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
let showTooltip = function(element) {
/**
*
* @param {object} set
* @param {HTMLElement} element
- Create a ticketCreate a ticket