Showing 131 of 308 total issues
File config-fix.ts
has 922 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Child } from "../../child-dev-project/children/model/child";
import { School } from "../../child-dev-project/schools/model/school";
import { ChildSchoolRelation } from "../../child-dev-project/children/model/childSchoolRelation";
import { defaultDateFilters } from "../basic-datatypes/date/date-range-filter/date-range-filter-panel/date-range-filter-panel.component";
import { EducationalMaterial } from "../../child-dev-project/children/educational-material/model/educational-material";
File data-aggregation.service.spec.ts
has 674 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { TestBed } from "@angular/core/testing";
import {
Aggregation,
DataAggregationService,
File query.service.spec.ts
has 608 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { TestBed, waitForAsync } from "@angular/core/testing";
import {
AttendanceInfo,
AttendanceReport,
File config.service.spec.ts
has 470 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { fakeAsync, TestBed, tick, waitForAsync } from "@angular/core/testing";
import { ConfigService } from "./config.service";
import { EntityMapperService } from "../entity/entity-mapper/entity-mapper.service";
import { Config } from "./config";
import { firstValueFrom, Subject } from "rxjs";
File matching-entities.component.spec.ts
has 449 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {
ComponentFixture,
fakeAsync,
flush,
TestBed,
Function calculateReport
has 166 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
calculateReport: () => {
return Promise.resolve([
{
header: { label: "Total # of children", result: 4 },
subRows: [
File handle-default-values.usecase.spec.ts
has 421 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { fakeAsync, TestBed, tick } from "@angular/core/testing";
import { HandleDefaultValuesUseCase } from "./handle-default-values.usecase";
import { EntityMapperService } from "../entity-mapper/entity-mapper.service";
import { CurrentUserSubject } from "../../session/current-user-subject";
File data-transformation.service.spec.ts
has 390 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { TestBed, waitForAsync } from "@angular/core/testing";
import { DataTransformationService } from "./data-transformation.service";
import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
import { Database } from "../../database/database";
File config-import-parser.service.spec.ts
has 378 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { TestBed } from "@angular/core/testing";
import { ConfigImportParserService } from "./config-import-parser.service";
import { EntityConfig } from "../../core/entity/entity-config";
import { ConfigService } from "../../core/config/config.service";
File matching-entities.component.ts
has 337 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {
ChangeDetectorRef,
Component,
ElementRef,
Input,
File entity-form.service.spec.ts
has 330 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { TestBed, waitForAsync } from "@angular/core/testing";
import { EntityFormService } from "./entity-form.service";
import {
FormControl,
File query.service.ts
has 320 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Injectable } from "@angular/core";
import { Entity, EntityConstructor } from "../entity/model/entity";
import { Note } from "../../child-dev-project/notes/model/note";
import { EventNote } from "../../child-dev-project/attendance/model/event-note";
import { EntityMapperService } from "../entity/entity-mapper/entity-mapper.service";
Function testDatatype
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function testDatatype<D extends DefaultDatatype>(
dataType: D | (new (params: any) => D),
objectValue,
databaseValue,
additionalSchemaFieldConfig?: any,
File basic-autocomplete.component.ts
has 305 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {
Component,
ContentChild,
ElementRef,
EventEmitter,
File children.service.spec.ts
has 305 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { ChildrenService } from "./children.service";
import { EntityMapperService } from "../../core/entity/entity-mapper/entity-mapper.service";
import { ChildSchoolRelation } from "./model/childSchoolRelation";
import { Child } from "./model/child";
import { School } from "../schools/model/school";
Function generate
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
Open
async generate<T extends Entity>(
filterConfigs: FilterConfig[],
entityConstructor: EntityConstructor<T>,
data: T[],
onlyShowUsedOptions = false,
- 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 attendance.service.spec.ts
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { TestBed, waitForAsync } from "@angular/core/testing";
import { AttendanceService } from "./attendance.service";
import { EntityMapperService } from "../../core/entity/entity-mapper/entity-mapper.service";
import { Database } from "../../core/database/database";
File couchdb-file.service.spec.ts
has 296 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { fakeAsync, TestBed, tick } from "@angular/core/testing";
import { CouchdbFileService } from "./couchdb-file.service";
import {
HttpClient,
File config-import-parser.service.ts
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Injectable } from "@angular/core";
import {
EntityListConfig,
GroupConfig,
} from "../../core/entity-list/EntityListConfig";
Function transformRawDataToEntities
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
Open
async transformRawDataToEntities(
rawData: any[],
entityType: string,
columnMapping: ColumnMapping[],
): Promise<Entity[]> {
- 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"