Function start
has 767 lines of code (exceeds 25 allowed). Consider refactoring. Open
start: function() {
/**
* builds most of the gui
* @returns {undefined}
*/
- Create a ticketCreate a ticket
Function build
has 746 lines of code (exceeds 25 allowed). Consider refactoring. Open
let build = function() {
/**
*
* @returns {Array}
*/
- Create a ticketCreate a ticket
Function wrapper
has 704 lines of code (exceeds 25 allowed). Consider refactoring. Open
let wrapper = function() {
/**
* creates the action tab
* @returns {Array}
*/
- Create a ticketCreate a ticket
File ui.js
has 1169 lines of code (exceeds 250 allowed). Consider refactoring. Open
idrinth.ui = {
/**
*
* @type HTMLElement
*/
- Create a ticketCreate a ticket
Function start
has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring. Open
start: function() {
/**
* builds most of the gui
* @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 buildControls
has 222 lines of code (exceeds 25 allowed). Consider refactoring. Open
let buildControls = function() {
/**
*
* @param {Array} list
* @param {String} header
- Create a ticketCreate a ticket
Function buildElement
has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring. Open
buildElement: function(config) {
/**
*
* @param {HTMLElement} el
* @param {object} config
- 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 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 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 buildActions
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
let buildActions = function() {
/**
*
* @param {string} label
* @param {string} onclick
- Create a ticketCreate a ticket
Function buildChat
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
buildChat: function(id, name, rank, pass) {
if (!idrinth.chat.elements.chats) {
idrinth.core.timeouts.add(
"chat-" + id,
function() {
- 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 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 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 makeTabs
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
let makeTabs = function(config) {
let head = [];
let first = true;
let body = [];
/**
- Create a ticketCreate a ticket
Function buildItem
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
let buildItem = function(label) {
let isCheck =
label === "mirele" || label === "kraken" || label === "utym";
return {
type: "tr",
- Create a ticketCreate a ticket
Function buildItem
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
let buildItem = function(label) {
return {
type: "tr",
children: [
{
- Create a ticketCreate a ticket
Function buildTiers
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
let buildTiers = function() {
/**
*
* @param {string} label
* @returns {object}
- Create a ticketCreate a ticket
Function updateClassesList
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
updateClassesList: function(element, add, remove) {
/**
*
* @param {String} classString
* @param {Array|String} add
- 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 updateClassesList
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
updateClassesList: function(element, add, remove) {
/**
*
* @param {String} classString
* @param {Array|String} add
- Create a ticketCreate a ticket
Function buildModal
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
buildModal: function(title, content, altFunc) {
let mod = {
children: [],
css: "idrinth-hovering-box idrinth-popup idrinth-" +
(typeof altFunc === "string" ? "confim" : "alert")
- 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 childOf
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
childOf: function(element, cssClass) {
do {
if (
element.className &&
element.className.match(new RegExp("(^|\s)" + cssClass + "(\s|$)"))
- 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
Similar blocks of code found in 2 locations. Consider refactoring. Open
{
type: "td",
children: [
{
type: "button",
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 67.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
{
type: "td",
children: [
{
type: "button",
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 67.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
let wrap = function(list, header) {
return {
children: [
{
type: "strong",
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 63.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
let wrap = function(list, header) {
return {
children: [
{
type: "strong",
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 63.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
{
content: idrinth.text.get("raids.disable.all"),
type: "button",
attributes: [
{
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 54.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
{
content: idrinth.text.get("raids.disable.none"),
type: "button",
attributes: [
{
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 54.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76