Showing 671 of 671 total issues
Function compOp
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public compOp(): CompOpContext {
const _localctx: CompOpContext = new CompOpContext(this._ctx, this.state);
this.enterRule(_localctx, 10, Query.RULE_compOp);
let _la: number;
try {
- 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 convertViewDependenciesByFieldIds
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
async convertViewDependenciesByFieldIds(
tableId: string,
newField: IFieldInstance,
oldField: IFieldInstance
) {
- 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 optionsRoToVoByCvType
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private optionsRoToVoByCvType(
cellValueType: CellValueType,
options: IFieldOptionsVo = {}
): { type: FieldType; options: IFieldOptionsRo } {
switch (cellValueType) {
- 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 getValidFilterOperators
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export function getValidFilterOperators(field: {
cellValueType: CellValueType;
type: FieldType;
isMultipleCellValue?: boolean;
}): IOperator[] {
- 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 ws_or_comment
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public ws_or_comment(): Ws_or_commentContext {
let _localctx: Ws_or_commentContext = new Ws_or_commentContext(this._ctx, this.state);
this.enterRule(_localctx, 4, Formula.RULE_ws_or_comment);
let _la: number;
try {
- 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 assertIncludes
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export function assertIncludes<T extends string[]>(
v: string | undefined,
stringArray: T,
msgOrErrorFactory?: IMsgOrErrorFactory,
caseInsensitive?: 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 json
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
json(field: IFieldInstance): Knex.QueryBuilder {
const { type, dbFieldName, isMultipleCellValue } = field;
if (this.isDistinct) {
if (isUserOrLink(type)) {
- 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 json
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
json(field: IFieldInstance): Knex.QueryBuilder {
const { type, dbFieldName, isMultipleCellValue } = field;
if (this.isDistinct) {
if (isUserOrLink(type)) {
- 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 generateLinkOptionsVo
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private async generateLinkOptionsVo(params: {
tableId: string;
optionsRo: ILinkFieldOptionsRo;
fieldId: string;
symmetricFieldId: string | undefined;
- 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 convertStringToCellValue
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
convertStringToCellValue(value: string): string | null {
if (this.isLookup) {
return null;
}
- 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 createForeignKey
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
async createForeignKey(options: ILinkFieldOptions) {
const { relationship, fkHostTableName, selfKeyName, foreignKeyName, isOneWay } = options;
let alterTableSchema: Knex.SchemaBuilder | undefined;
- 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 eval
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
eval(
params: TypedValue<string | number | boolean | (string | number | boolean | null)[]>[]
): string | number | boolean | null | (string | number | boolean | null)[] {
const paramsLength = params.length;
const expression = params[0].value;
- 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 deleteCommentReaction
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
async deleteCommentReaction(
tableId: string,
recordId: string,
commentId: string,
reactionRo: { reaction: string }
- 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 getJsonQueryColumn
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected getJsonQueryColumn(field: IFieldInstance, operator: IFilterOperator): string {
const defaultJsonColumn = 'json_each.value';
if (field.type === FieldType.Link) {
const object = field.isMultipleCellValue ? defaultJsonColumn : field.dbFieldName;
const path = ([contains.value, doesNotContain.value] as string[]).includes(operator)
- 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 register
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
static register(): DynamicModule {
return BaseLoggerModule.forRootAsync({
inject: [ClsService, ConfigService],
useFactory: (cls: ClsService, config: ConfigService) => {
const { level } = config.getOrThrow<ILoggerConfig>('logger');
- 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 transformNodeValue
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private transformNodeValue(typedValue: TypedValue, ctx: BinaryOpContext) {
// A Node with a field value type requires dedicated string conversion logic to be executed.
if (!typedValue.field) {
return typedValue;
}
- 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 identifier
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public identifier(): IdentifierContext {
let _localctx: IdentifierContext = new IdentifierContext(this._ctx, this.state);
this.enterRule(_localctx, 12, Formula.RULE_identifier);
let _la: number;
try {
- 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 saveForeignKeyForOneOne
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private async saveForeignKeyForOneOne(
field: LinkFieldDto,
fkMap: { [recordId: string]: IFkRecordItem }
) {
const { selfKeyName, foreignKeyName, fkHostTableName } = field.options;
- 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 GroupPointProvider
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const GroupPointProvider = ({ children }: GroupPointProviderProps) => {
const { tableId, viewId, shareId } = useContext(ShareViewContext);
const queryClient = useQueryClient();
const view = useView(viewId);
const { searchQuery } = useSearch();
- 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 saveForeignKeyToDb
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private async saveForeignKeyToDb(fieldMap: IFieldMap, fkRecordMap: IFkRecordMap) {
for (const fieldId in fkRecordMap) {
const fkMap = fkRecordMap[fieldId];
const field = fieldMap[fieldId] as LinkFieldDto;
const relationship = field.options.relationship;
- 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"