Showing 162 of 178 total issues
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 startInternal
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
let startInternal = function() {
/**
* initializes all modules
* @returns {undefined}
*/
- Create a ticketCreate a ticket
Function start
has 54 lines of code (exceeds 25 allowed). Consider refactoring. 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 16 (exceeds 5 allowed). Consider refactoring. Open
start: function() {
/**
* creates the tooltip-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 getIdentifier
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
let getIdentifier = function() {
/**
* from http://stackoverflow.com/a/105074
* @returns {String}
*/
- Create a ticketCreate a ticket
Function applyMemberData
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
let applyMemberData = function() {
/**
*
* @param {HTMLElement} chat
* @param {Number} chatId
- Create a ticketCreate a ticket
Function init
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
let init = function() {
if (!idrinth.text.initialized) {
return;
}
if (idrinth.platform === "newgrounds") {
- Create a ticketCreate a ticket
Function run
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
run: function() {
/**
*
* @param {string} added the path-segment defining the data returned
* @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 start
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. 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 getPromotionOptions
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
let getPromotionOptions = function(chat) {
let promotionModes = [
{
chat: chat,
label: "chat.actions.banUser",
- Create a ticketCreate a ticket
Function buildEmoticons
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
buildEmoticons: function(message) {
if (!idrinth.chat.emotes.lookup) {
return message;
}
let part = idrinth.core.escapeRegExp(
- Create a ticketCreate a ticket
Function process
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
process: function() {
let date = new Date().getTime() + new Date().getMilliseconds() / 1000;
let min = 10;
/**
*
- 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 start
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
start: function() {
/**
*
* @returns {HTMLElement}
*/
- 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 14 (exceeds 5 allowed). Consider refactoring. Open
start: function() {
/**
*
* @param {Sstring} name
* @returns {String}
- 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 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
start: function() {
let language =
idrinth.settings.get("lang") ||
window.navigator.userLanguage ||
window.navigator.language ||
- Create a ticketCreate a ticket
Function times
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
P.mul = P.times = function(y) {
var c,
x = this,
Big = x.constructor,
xc = x.c,
- Create a ticketCreate a ticket
Function plus
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
P.add = P.plus = function(y) {
var t, x = this, Big = x.constructor, a = x.s, b = (y = new Big(y)).s;
// Signs differ?
if (a != b) {
- Create a ticketCreate a ticket
Function complexHandler
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
let complexHandler = function(message, regex, callbacks, lastField) {
/**
*
* @param {Number} count
* @param {Array} callbacks
- Create a ticketCreate a ticket
Function loginActions
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
loginActions: function(key) {
let chatLogin,
success,
urls = {
register: "chat-service/register/",
- Create a ticketCreate a ticket