Undre4m/igniculus

View on GitHub

Showing 4 of 6 total issues

File index.js has 303 lines of code (exceeds 250 allowed). Consider refactoring.
Confirmed

'use strict';

/* SQL-92 standard data types and keywords
 * http://www.frontbase.com/docs/5.3.html
 */
Severity: Minor
Found in index.js - About 3 hrs to fix

    Avoid deeply nested control flow statements.
    Open

                        if (typeof rule.transform === 'string')
                            re = rule.transform;
                        else if (typeof rule.transform === 'function')
                            re = rule.transform(i);
    Severity: Major
    Found in index.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if (rule && rule.sequence)
                              output = output.replace('⥂_' + key + '⥄', rule.sequence + re + ANSIModes.reset);
                          else
                              output = output.replace('⥂_' + key + '⥄', re);
      Severity: Major
      Found in index.js - About 45 mins to fix

        Function union has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Confirmed

        function union() {
            let array = [];
            for (let arg of arguments)
                for (let item of arg)
                    if (!~array.indexOf(item))
        Severity: Minor
        Found in index.js - About 25 mins 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