Idrinth/IDotD

View on GitHub

Showing 162 of 178 total issues

Function start has 767 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  start: function() {
    /**
         * builds most of the gui
         * @returns {undefined}
         */
Severity: Major
Found in src/mods/ui.js - About 3 days to fix

Function build has 746 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    let build = function() {
      /**
             *
             * @returns {Array}
             */
Severity: Major
Found in src/mods/ui.js - About 3 days to fix

Function wrapper has 704 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      let wrapper = function() {
        /**
                 * creates the action tab
                 * @returns {Array}
                 */
Severity: Major
Found in src/mods/ui.js - About 3 days to fix

File chat.js has 1223 lines of code (exceeds 250 allowed). Consider refactoring.
Open

idrinth.chat = {
  /**
     * own user id
     * @type Number
     */
Severity: Major
Found in src/mods/chat.js - About 3 days to fix

Function refreshChats has a Cognitive Complexity of 155 (exceeds 5 allowed). Consider refactoring.
Open

  refreshChats: function() {
    /**
         * 
         * @param {String} data
         * @returns {undefined}
Severity: Minor
Found in src/mods/chat.js - About 3 days to fix

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 ui.js has 1169 lines of code (exceeds 250 allowed). Consider refactoring.
Open

idrinth.ui = {
  /**
     *
     * @type HTMLElement
     */
Severity: Major
Found in src/mods/ui.js - About 3 days to fix

Function getData has a Cognitive Complexity of 125 (exceeds 5 allowed). Consider refactoring.
Open

  getData: function() {
    /**
         *
         * @param {object} data
         * @returns {undefined}
Severity: Minor
Found in src/mods/war.js - About 2 days to fix

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 refreshChats has 314 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  refreshChats: function() {
    /**
         * 
         * @param {String} data
         * @returns {undefined}
Severity: Major
Found in src/mods/chat.js - About 1 day to fix

Function start has 288 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  start: function() {
    /**
         * 
         * @returns {HTMLElement}
         */
Severity: Major
Found in src/mods/chat.js - About 1 day to fix

File big.js has 586 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* big.js v3.1.3 https://github.com/MikeMcl/big.js/LICENCE */
(function(global) {
  "use strict";
  /*
  big.js v3.1.3
Severity: Major
Found in src/libs/big.js - About 1 day to fix

Function tiers has 242 lines of code (exceeds 25 allowed). Consider refactoring.
Open

     tiers: function(list) {
      /**
             *
             * @param {HTMLElement} elem
             * @returns {undefined}
Severity: Major
Found in src/mods/workers.js - About 1 day to fix

Function build has 240 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    let build = function() {
      /**
             * 
             * @param {String} label
             * @returns {Object}
Severity: Major
Found in src/mods/chat.js - About 1 day to fix

Function process has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
Open

    process: function() {
      /**
             * 
             * @returns {Boolean}
             */
Severity: Minor
Found in src/mods/raids.js - About 1 day to fix

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 59 (exceeds 5 allowed). Consider refactoring.
Open

  start: function() {
    /**
         * fills the data from json in idotd
         * @returns {undefined}
         */
Severity: Minor
Found in src/mods/settings.js - About 1 day to fix

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 58 (exceeds 5 allowed). Consider refactoring.
Open

  start: function() {
    /**
         * builds most of the gui
         * @returns {undefined}
         */
Severity: Minor
Found in src/mods/ui.js - About 1 day to fix

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 applyMessages has 226 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    let applyMessages = function(data) {
      /**
             * 
             * @param {String} messages
             * @returns {undefined}
Severity: Major
Found in src/mods/chat.js - About 1 day to fix

Function buildControls has 222 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        let buildControls = function() {
          /**
                     *
                     * @param {Array} list
                     * @param {String} header
Severity: Major
Found in src/mods/ui.js - About 1 day to fix

Function getData has 214 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  getData: function() {
    /**
         *
         * @param {object} data
         * @returns {undefined}
Severity: Major
Found in src/mods/war.js - About 1 day to fix

Function processMessages has 209 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      let processMessages = function(messages) {
        /**
                 * 
                 * @param {Array} chatMessages
                 * @param {Number} chatId
Severity: Major
Found in src/mods/chat.js - About 1 day to fix

Function buildElement has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
Open

  buildElement: function(config) {
    /**
         *
         * @param {HTMLElement} el
         * @param {object} config
Severity: Minor
Found in src/mods/ui.js - About 7 hrs to fix

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

Severity
Category
Status
Source
Language