Showing 123 of 286 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 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 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 338 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {
ChangeDetectorRef,
Component,
ElementRef,
Input,
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";
File basic-autocomplete.component.ts
has 317 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {
Component,
ContentChild,
ElementRef,
EventEmitter,
Function generate
has a Cognitive Complexity of 24 (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 entity-form.service.spec.ts
has 306 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 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 children.service.spec.ts
has 302 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";
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";
File config.service.spec.ts
has 293 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";
Function generate
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async generate<T extends Entity>(
filterConfigs: FilterConfig[],
entityConstructor: EntityConstructor<T>,
data: T[],
onlyShowUsedOptions = false,
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"
Further reading
Entity
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
Open
export class Entity {
/**
* The entity's type.
* In classes extending Entity this is usually overridden by the class annotation `@DatabaseEntity('NewEntity')`.
* The type needs to be used as routing path in lower case. The routing path can be defined in the configuration file.