Showing 4 of 6 total issues
File index.js
has 303 lines of code (exceeds 250 allowed). Consider refactoring. Confirmed
Confirmed
'use strict';
/* SQL-92 standard data types and keywords
* http://www.frontbase.com/docs/5.3.html
*/
Avoid deeply nested control flow statements. Open
Open
if (typeof rule.transform === 'string')
re = rule.transform;
else if (typeof rule.transform === 'function')
re = rule.transform(i);
Avoid deeply nested control flow statements. Open
Open
if (rule && rule.sequence)
output = output.replace('⥂_' + key + '⥄', rule.sequence + re + ANSIModes.reset);
else
output = output.replace('⥂_' + key + '⥄', re);
Function union
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Confirmed
Confirmed
function union() {
let array = [];
for (let arg of arguments)
for (let item of arg)
if (!~array.indexOf(item))
- Read upRead up
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"