Showing 76 of 181 total issues
Function evaluateValueOp
has a Cognitive Complexity of 125 (exceeds 5 allowed). Consider refactoring. Open
private evaluateValueOp(
evaluatedArguments: ISmalltalkValue[],
globalInfo: ISmalltalkGlobalInfo
): ISmalltalkValue {
evaluatedArguments = evaluatedArguments.map((arg) => unblockValue(arg));
- 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 evaluateValueOp
has 315 lines of code (exceeds 25 allowed). Consider refactoring. Open
private evaluateValueOp(
evaluatedArguments: ISmalltalkValue[],
globalInfo: ISmalltalkGlobalInfo
): ISmalltalkValue {
evaluatedArguments = evaluatedArguments.map((arg) => unblockValue(arg));
File operator-usage.ts
has 597 lines of code (exceeds 250 allowed). Consider refactoring. Open
// tom-weatherhead/thaw-grammar/src/languages/smalltalk/domain-object-model/operator-usage.ts
import { EvaluationException, Name } from 'thaw-interpreter-core';
import { EnvironmentFrame } from '../../../common/domain-object-model/environment-frame';
Function objectToString_ApostrophesToQuoteKeywords
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public objectToString_ApostrophesToQuoteKeywords(expr: unknown): string {
if (isFunctionDefinition<ISExpression>(expr)) {
return `(define ${expr.functionName} (${expr.argList
.map((a) => a.name)
.join(' ')}) ${this.objectToString_ApostrophesToQuoteKeywords(expr.body)})`;
- 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 evaluate
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public evaluate(
globalInfo: IGlobalInfo<ICLUValue>,
localEnvironment?: IEnvironmentFrame<ICLUValue>,
options?: unknown
): ICLUValue {
- 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 objectToString_ApostrophesToQuoteKeywords
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
public objectToString_ApostrophesToQuoteKeywords(expr: unknown): string {
if (isFunctionDefinition<ISExpression>(expr)) {
return `(define ${expr.functionName} (${expr.argList
.map((a) => a.name)
.join(' ')}) ${this.objectToString_ApostrophesToQuoteKeywords(expr.body)})`;
Function evaluate
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
public evaluate(
globalInfo: IGlobalInfo<ICLUValue>,
localEnvironment?: IEnvironmentFrame<ICLUValue>,
options?: unknown
): ICLUValue {
APLValue
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
export class APLValue implements IAPLValue {
public static createNull(): IAPLValue {
return new APLValue([], []);
}
Function evaluate
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
public evaluate(
globalInfo: ISmalltalkGlobalInfo, // I.e. IGlobalInfo<ISmalltalkValue>
localEnvironment: ISmalltalkEnvironmentFrame | undefined, // I.e. IEnvironmentFrame<ISmalltalkValue> | undefined
options?: unknown
): ISmalltalkValue {
Function evaluate
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public evaluate(
globalInfo: ISmalltalkGlobalInfo, // I.e. IGlobalInfo<ISmalltalkValue>
localEnvironment: ISmalltalkEnvironmentFrame | undefined, // I.e. IEnvironmentFrame<ISmalltalkValue> | undefined
options?: unknown
): ISmalltalkValue {
- 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
File operators.ts
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
// tom-weatherhead/thaw-grammar/src/languages/lambda-calculus/operators.ts
import { ifDefinedThenElse } from 'thaw-common-utilities.ts';
import { ILCExpression } from './domain-object-model/interfaces/expression';
Function toStringHelper
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
private toStringHelper(
sb: string,
offsetVector: number[],
offset: number,
firstSlice: boolean
- 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 compose
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public compose(otherSub: ISubstitution): ISubstitution {
const newSub = new PrologSubstitution();
// 1) Apply the Src substitution to this's terms.
- 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 evaluateNormal
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
protected evaluateNormal(
funDef: CLUNormalFunctionDefinition | undefined,
evaluatedArguments: ICLUValue[],
cluster: ICluster | undefined,
globalInfo: IGlobalInfo<ICLUValue>
- 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 constructor
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
constructor(public readonly shape: number[], srcList?: number[]) {
// console.log(`shape (length ${shape.length}) is:`, shape);
// console.log('srcList is', typeof srcList, srcList);
if (this.shape.some((s) => s < 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
File operator-usage.ts
has 255 lines of code (exceeds 250 allowed). Consider refactoring. Open
// clu/domain-object-model/operator-usage.ts
// import { ArgumentException } from 'thaw-interpreter-core';
import {
Function toStringHelper
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
private toStringHelper(
sb: string,
offsetVector: number[],
offset: number,
firstSlice: boolean
Function evaluateAux
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected evaluateAux(
evaluatedArguments: T[],
globalInfo: IGlobalInfo<T>,
localEnvironment?: IEnvironmentFrame<T>,
options?: unknown
Function compose
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public compose(otherSub: ISubstitution): ISubstitution {
const newSub = new PrologSubstitution();
// 1) Apply the Src substitution to this's terms.
Function compose
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public compose(otherSub: ILCSubstitution): ILCSubstitution {
const newSub = new LCSubstitution();
// 1) Apply the Src substitution to this's terms.
- 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"