Showing 127 of 282 total issues
Function getActivitiesForChild
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
async getActivitiesForChild(childId: string): Promise<RecurringActivity[]> {
const activities = await this.dbIndexing.queryIndexDocs(
RecurringActivity,
"activities_index/by_participant",
childId,
- 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 generateRows
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private generateRows(
data: any[],
config: ExportColumnConfig[],
from: Date,
to: Date,
- 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 loadActivities
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private async loadActivities() {
this.allActivities = await this.entityMapper
.loadType(RecurringActivity)
.then((res) => res.filter((a) => a.isActive));
- 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 getValueDescription
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function getValueDescription(value: any, property: string): string {
if (typeof value === "boolean") {
return value
? property
: $localize`:Not a certain property|e.g. 'not male':not ${property}`;
- 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 parseImportDefinition
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
parseImportDefinition(
configRaw: ConfigFieldRaw[],
entityName: string,
includingDefaultConfigs: boolean,
): GeneratedConfig {
- 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 getDaysSinceLastNoteOfEachEntity
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public async getDaysSinceLastNoteOfEachEntity(
entityType = Child.ENTITY_TYPE,
forLastNDays: number = 30,
): Promise<Map<string, number>> {
const startDay = moment().subtract(forLastNDays, "days");
- 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 getSchemaFieldsForDetailsView
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
static getSchemaFieldsForDetailsView(entity: Entity): FormFieldConfig[] {
let formFields: string[] = [];
let isUsingShowFlag = false;
for (const [key, field] of entity.getSchema()) {
- 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"