src/mods/tier.js
Function addTagged
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addTagged: function(name) {
/**
*
* @param {string} key
* @returns {Boolean}
- Create a ticketCreate a ticket
Function make
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
start: function() {
let pos = 1;
/**
* parsed a json-response and fills tier list and exclusion list
* @param {string} data
- Create a ticketCreate a ticket
Function start
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Open
start: function() {
let pos = 1;
/**
* parsed a json-response and fills tier list and exclusion list
* @param {string} 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 importData
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
let importData = function(data) {
data = JSON.parse(data);
if (data) {
idrinth.tier.list = data;
/**
- Create a ticketCreate a ticket
Function addTagged
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
addTagged: function(name) {
/**
*
* @param {string} key
* @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"