Showing 671 of 671 total issues
File link-api.e2e-spec.ts
has 2609 lines of code (exceeds 300 allowed). Consider refactoring. Open
/* eslint-disable sonarjs/cognitive-complexity */
/* eslint-disable @typescript-eslint/no-non-null-assertion */
/* eslint-disable @typescript-eslint/naming-convention */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable sonarjs/no-duplicate-string */
File layoutRenderer.ts
has 1594 lines of code (exceeds 300 allowed). Consider refactoring. Open
import { contractColorForTheme } from '@teable/core';
import { isEqual, groupBy, cloneDeep } from 'lodash';
import type { IGridTheme } from '../../configs';
import { GRID_DEFAULT, ROW_RELATED_REGIONS } from '../../configs';
import type { IVisibleRegion } from '../../hooks';
File Query.ts
has 1466 lines of code (exceeds 300 allowed). Consider refactoring. Open
// Generated from src/query/parser/Query.g4 by ANTLR 4.9.0-SNAPSHOT
import { ATN } from 'antlr4ts/atn/ATN';
import { ATNDeserializer } from 'antlr4ts/atn/ATNDeserializer';
import { ParserATNSimulator } from 'antlr4ts/atn/ParserATNSimulator';
File record.service.ts
has 1459 lines of code (exceeds 300 allowed). Consider refactoring. Open
/* eslint-disable @typescript-eslint/naming-convention */
import {
BadRequestException,
Injectable,
InternalServerErrorException,
File undo-redo.e2e-spec.ts
has 1202 lines of code (exceeds 300 allowed). Consider refactoring. Open
/* eslint-disable sonarjs/no-duplicate-string */
import type { INestApplication } from '@nestjs/common';
import type { IFieldRo, IFieldVo, ILinkFieldOptions, IRollupFieldOptions } from '@teable/core';
import {
CellValueType,
File field-supplement.service.ts
has 1154 lines of code (exceeds 300 allowed). Consider refactoring. Open
/* eslint-disable sonarjs/no-duplicate-string */
import { BadRequestException, Injectable } from '@nestjs/common';
import type {
IFieldRo,
IFieldVo,
Function GridViewBaseInner
has a Cognitive Complexity of 138 (exceeds 5 allowed). Consider refactoring. Open
export const GridViewBaseInner: React.FC<IGridViewBaseInnerProps> = (
props: IGridViewBaseInnerProps
) => {
const { groupPointsServerData, onRowExpand } = props;
const { t } = useTranslation(tableConfig.i18nNamespaces);
- 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 date-time.spec.ts
has 1090 lines of code (exceeds 300 allowed). Consider refactoring. Open
/* eslint-disable sonarjs/no-duplicate-string */
import type { IRecord } from '../../models';
import { CellValueType } from '../../models/field/constant';
import { TypedValue } from '../typed-value';
import {
File Formula.ts
has 1072 lines of code (exceeds 300 allowed). Consider refactoring. Open
// Generated from src/formula/parser/Formula.g4 by ANTLR 4.9.0-SNAPSHOT
import { ATN } from "antlr4ts/atn/ATN";
import { ATNDeserializer } from "antlr4ts/atn/ATNDeserializer";
File reference.service.ts
has 1042 lines of code (exceeds 300 allowed). Consider refactoring. Open
import {
BadRequestException,
Injectable,
InternalServerErrorException,
Logger,
Function expr
has a Cognitive Complexity of 117 (exceeds 5 allowed). Consider refactoring. Open
public expr(_p?: number): ExprContext {
if (_p === undefined) {
_p = 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 link.service.ts
has 993 lines of code (exceeds 300 allowed). Consider refactoring. Open
import { BadRequestException, Injectable } from '@nestjs/common';
import type { ILinkCellValue, ILinkFieldOptions } from '@teable/core';
import { FieldType, Relationship } from '@teable/core';
import type { Field } from '@teable/db-main-prisma';
import { PrismaService } from '@teable/db-main-prisma';
File field-converting.service.ts
has 988 lines of code (exceeds 300 allowed). Consider refactoring. Open
import {
BadRequestException,
Injectable,
InternalServerErrorException,
Logger,
Function InteractionLayerBase
has a Cognitive Complexity of 114 (exceeds 5 allowed). Consider refactoring. Open
> = (props, ref) => {
const {
theme,
width,
height,
- 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 GridViewBaseInner
has 722 lines of code (exceeds 300 allowed). Consider refactoring. Open
export const GridViewBaseInner: React.FC<IGridViewBaseInnerProps> = (
props: IGridViewBaseInnerProps
) => {
const { groupPointsServerData, onRowExpand } = props;
const { t } = useTranslation(tableConfig.i18nNamespaces);
File selection.service.spec.ts
has 908 lines of code (exceeds 300 allowed). Consider refactoring. Open
/* eslint-disable @typescript-eslint/no-explicit-any */
import { faker } from '@faker-js/faker';
import type { TestingModule } from '@nestjs/testing';
import { Test } from '@nestjs/testing';
import type { IFieldOptionsVo, IFieldVo } from '@teable/core';
Function InteractionLayerBase
has 649 lines of code (exceeds 300 allowed). Consider refactoring. Open
> = (props, ref) => {
const {
theme,
width,
height,
File GridViewBaseInner.tsx
has 818 lines of code (exceeds 300 allowed). Consider refactoring. Open
import { useMutation } from '@tanstack/react-query';
import type { IFieldVo } from '@teable/core';
import {
FieldKeyType,
RowHeightLevel,
File constants.ts
has 796 lines of code (exceeds 300 allowed). Consider refactoring. Open
/* eslint-disable sonarjs/no-duplicate-string, @typescript-eslint/naming-convention */
import { FormulaFuncType, FunctionName, FUNCTIONS, FormulaLexer } from '@teable/core';
import { Hash, A, CheckSquare, Calendar } from '@teable/icons';
import { useMemo } from 'react';
import { useTranslation } from '../../../context/app/i18n';
File view-open-api.service.ts
has 773 lines of code (exceeds 300 allowed). Consider refactoring. Open
import {
BadRequestException,
Injectable,
Logger,
NotFoundException,