Showing 7 of 90 total issues
File flat-join-function.ts
has 263 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {
tail,
head,
AsyncItemOrSelfType,
FluentAsyncIterable,
Function getStatsStepper
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getStatsStepper() {
const avgStepper = getAverageStepper();
const minMaxStepper = getMinMaxStepper();
let variance: number | undefined;
let lastVarianceCount = 0;
Function getGroupingTopHit
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getGroupingTopHit<K, T, NewT = T>(
distinct: AnyMapper<T> | Choose<NewT>,
choose?: Choose<NewT>,
mapper: Mapper<T, NewT> | keyof T = identity as any,
): KVGroupTransform<K, T, NewT> {
Function distinctRecipe
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function distinctRecipe(ingredients: DistinctIngredients) {
const ordered = orderedDistinctRecipe(ingredients);
const choose = chooseDistinctRecipe(ingredients);
const { filterOrAll, resolver } = ingredients;
Function groupRecipe
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function groupRecipe(ingredients: GroupIngredients) {
const orderedGroup = orderedGroupRecipe(ingredients);
const { reduceAndMap, resolver, iterate, forEach } = ingredients;
return function <T>(
this: AnyIterable<T>,
Function distinct
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
return function distinct<T>(
this: AnyIterable<T>,
mappers: FunctionAnyMapper<any>[],
) {
const { length } = mappers;
Function distinctRecipe
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
export function distinctRecipe(ingredients: DistinctIngredients) {
const ordered = orderedDistinctRecipe(ingredients);
const choose = chooseDistinctRecipe(ingredients);
const { filterOrAll, resolver } = ingredients;
- 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"