Showing 7 of 10 total issues
Function polynomial
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
Open
polynomial(data, options) {
const lhs = [];
const rhs = [];
let a = 0;
let b = 0;
- 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"
Further reading
Function polynomial
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
polynomial(data, options) {
const lhs = [];
const rhs = [];
let a = 0;
let b = 0;
Function gaussianElimination
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
Open
function gaussianElimination(input, order) {
const matrix = input;
const n = input.length - 1;
const coefficients = [order];
- 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"
Further reading
Function gaussianElimination
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function gaussianElimination(input, order) {
const matrix = input;
const n = input.length - 1;
const coefficients = [order];
Function exponential
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exponential(data, options) {
const sum = [0, 0, 0, 0, 0, 0];
for (let n = 0; n < data.length; n++) {
if (data[n][1] !== null) {
Function linear
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
linear(data, options) {
const sum = [0, 0, 0, 0, 0];
let len = 0;
for (let n = 0; n < data.length; n++) {
Function power
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
power(data, options) {
const sum = [0, 0, 0, 0, 0];
const len = data.length;
for (let n = 0; n < len; n++) {