Showing 11 of 17 total issues
Function __eratosthenes23__
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
export function __eratosthenes23__(alloc, fill, get, gothrough, usqrt) {
const first = 5;
const eratosthenes23 = function (n, callback) {
let j;
- 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 __eratosthenes23__
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function __eratosthenes23__(alloc, fill, get, gothrough, usqrt) {
const first = 5;
const eratosthenes23 = function (n, callback) {
let j;
Function eratosthenes23
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
const eratosthenes23 = function (n, callback) {
let j;
let p;
let l;
Function __eratosthenes2__
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export function __eratosthenes2__(alloc, fill, get, gothrough, usqrt) {
const first = 3;
const eratosthenes2 = function (n, callback) {
if (n <= 2) {
- 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 __eratosthenes__
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function __eratosthenes__(alloc, fill, get, gothrough, usqrt) {
const first = 2;
const eratosthenes = function (n, callback) {
if (n <= 2) {
- 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 __eratosthenes2__
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function __eratosthenes2__(alloc, fill, get, gothrough, usqrt) {
const first = 3;
const eratosthenes2 = function (n, callback) {
if (n <= 2) {
Function stoa
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function stoa(i, n) {
let line = (i / n) | 0;
let col = i % n;
if (n % 2 === 0) {
Function __eratosthenes2__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function __eratosthenes2__(alloc, fill, get, gothrough, usqrt) {
Function __eratosthenes__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function __eratosthenes__(alloc, fill, get, gothrough, usqrt) {
Function __eratosthenes23__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function __eratosthenes23__(alloc, fill, get, gothrough, usqrt) {
Function atos
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function atos(i, n) {
const s = Math.sqrt(i) | 0;
const l = s;
const r = s + 1;
const L = l * l;
- 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"