NGO-DB/ndb-core

View on GitHub

Showing 159 of 288 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  toBeEnabled: (util) => {
    return makeCustomMatcher(
      (form: AbstractControl) => form.enabled,
      (form) => `Expected form ${util.pp(form.value)} to be enabled`,
      (form) => `Expected form ${util.pp(form.value)} not to be enabled`,
Severity: Major
Found in src/app/utils/test-utils/form-matchers.spec.ts and 1 other location - About 1 hr to fix
src/app/utils/test-utils/form-matchers.spec.ts on lines 29..35

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 84.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  toBeValidForm: (util) => {
    return makeCustomMatcher(
      (form: AbstractControl) => form.valid,
      (form) => `Expected form ${util.pp(form.value)} to be valid`,
      (form) => `Expected form ${util.pp(form.value)} not to be valid`,
Severity: Major
Found in src/app/utils/test-utils/form-matchers.spec.ts and 1 other location - About 1 hr to fix
src/app/utils/test-utils/form-matchers.spec.ts on lines 36..42

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 84.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  it("calculates individual's absent events", () => {
    expect(testInstance.countEventsAbsent("1")).toBe(0);
    expect(testInstance.countEventsAbsent("2")).toBe(1);
    expect(testInstance.countEventsAbsent("3")).toBe(1);
  });
src/app/child-dev-project/attendance/model/activity-attendance.spec.ts on lines 51..55

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  it("calculates individual's present events", () => {
    expect(testInstance.countEventsPresent("1")).toBe(2);
    expect(testInstance.countEventsPresent("2")).toBe(1);
    expect(testInstance.countEventsPresent("3")).toBe(0);
  });
src/app/child-dev-project/attendance/model/activity-attendance.spec.ts on lines 45..49

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  constructor(components: ComponentRegistry) {
    components.addAll([
      [
        "Admin",
        () => import("./admin/admin.component").then((c) => c.AdminComponent),
Severity: Major
Found in src/app/core/admin/admin.module.ts and 1 other location - About 1 hr to fix
src/app/features/dashboard-widgets/entity-count-dashboard-widget/entity-count-dashboard-widget.module.ts on lines 6..23

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 81.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  constructor(components: ComponentRegistry) {
    components.addAll([
      [
        "EntityCountDashboard",
        () =>
src/app/core/admin/admin.module.ts on lines 20..34

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 81.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 17 locations. Consider refactoring.
Open

  {
    category: defaultInteractionTypes.find((t) => t.id === "COACHING_CLASS"),
    warningLevel: warningLevels.find((level) => level.id === "OK"),
    subject: $localize`:Note demo subject:Children Meeting`,
    text: $localize`:Note demo text:
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 5..12
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 13..20
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 22..29
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 38..45
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 5..13
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 14..22
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 24..31
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 32..39
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 40..48
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 49..57
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 58..66
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 67..75
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 76..84
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 85..94
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 95..103
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 104..112

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 17 locations. Consider refactoring.
Open

  {
    category: defaultInteractionTypes.find((t) => t.id === "VISIT"),
    warningLevel: warningLevels.find((level) => level.id === "WARNING"),
    subject: $localize`:Note demo subject:Needs to work more for school`,
    text: $localize`:Note demo text:
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 5..12
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 13..20
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 22..29
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 30..37
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 38..45
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 5..13
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 14..22
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 24..31
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 32..39
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 40..48
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 49..57
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 67..75
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 76..84
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 85..94
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 95..103
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 104..112

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 17 locations. Consider refactoring.
Open

  {
    category: defaultInteractionTypes.find((t) => t.id === "GUARDIAN_TALK"),
    warningLevel: warningLevels.find((level) => level.id === "URGENT"),
    subject: $localize`:Note demo subject:Absence without information`,
    text: $localize`:Note demo text:
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 5..12
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 13..20
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 22..29
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 30..37
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 38..45
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 5..13
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 14..22
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 24..31
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 32..39
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 49..57
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 58..66
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 67..75
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 76..84
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 85..94
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 95..103
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 104..112

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 17 locations. Consider refactoring.
Open

  {
    category: defaultInteractionTypes.find((t) => t.id === "COACHING_CLASS"),
    warningLevel: warningLevels.find((level) => level.id === "OK"),
    subject: $localize`:Note demo subject:Children Meeting`,
    text: $localize`:Note demo text:
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 5..12
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 13..20
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 30..37
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 38..45
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 5..13
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 14..22
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 24..31
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 32..39
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 40..48
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 49..57
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 58..66
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 67..75
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 76..84
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 85..94
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 95..103
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 104..112

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

describe("When on a small screen, the filter component above the entity list should not be visible", () => {
  before("GIVEN that the screen is small", () => {
    cy.visit("child");
    cy.viewport("iphone-6");
  });
Severity: Major
Found in e2e/integration/HidingFilterOnSmallScreen.cy.ts and 1 other location - About 1 hr to fix
e2e/integration/HidingFilterOnSmallScreen.cy.ts on lines 1..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 17 locations. Consider refactoring.
Open

  {
    category: defaultInteractionTypes.find((t) => t.id === "NOTE"),
    warningLevel: warningLevels.find((level) => level.id === "WARNING"),
    subject: $localize`:Note demo subject:Disturbing class`,
    text: $localize`:Note demo text:
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 5..12
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 13..20
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 22..29
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 30..37
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 38..45
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 5..13
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 14..22
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 24..31
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 32..39
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 40..48
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 49..57
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 58..66
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 67..75
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 76..84
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 85..94
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 95..103

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 17 locations. Consider refactoring.
Open

  {
    category: defaultInteractionTypes.find((t) => t.id === "GUARDIAN_TALK"),
    warningLevel: warningLevels.find((level) => level.id === "WARNING"),
    subject: $localize`:Note demo subject:Discussed school change`,
    text: $localize`:Note demo text:
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 5..12
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 13..20
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 22..29
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 30..37
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 38..45
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 5..13
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 24..31
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 32..39
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 40..48
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 49..57
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 58..66
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 67..75
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 76..84
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 85..94
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 95..103
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 104..112

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 17 locations. Consider refactoring.
Open

  {
    category: defaultInteractionTypes.find((t) => t.id === "GUARDIAN_TALK"),
    warningLevel: warningLevels.find((level) => level.id === "OK"),
    subject: $localize`:Note demo subject:Follow up for school absence`,
    text: $localize`:Note demo text:
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 5..12
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 13..20
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 22..29
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 30..37
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 38..45
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 5..13
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 14..22
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 32..39
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 40..48
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 49..57
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 58..66
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 67..75
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 76..84
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 85..94
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 95..103
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 104..112

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 17 locations. Consider refactoring.
Open

  {
    category: defaultInteractionTypes.find((t) => t.id === "INCIDENT"),
    warningLevel: warningLevels.find((level) => level.id === "OK"),
    subject: $localize`:Note demo subject:Special help for family`,
    text: $localize`:Note demo text:
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 5..12
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 13..20
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 22..29
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 30..37
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 38..45
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 5..13
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 14..22
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 24..31
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 32..39
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 40..48
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 49..57
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 58..66
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 67..75
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 85..94
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 95..103
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 104..112

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  constructor(
    private demoDataService: DemoDataService,
    private localAuthService: LocalAuthService,
    private sessionManager: SessionManagerService,
    private dialog: MatDialog,
Severity: Major
Found in src/app/core/demo-data/demo-data-initializer.service.ts and 1 other location - About 1 hr to fix
src/app/features/public-form/public-form.component.ts on lines 37..46

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

describe("When on a big screen, the filter component above the entity list should be visible", () => {
  before("GIVEN that the screen is big", () => {
    cy.visit("child");
    cy.viewport("macbook-15");
  });
Severity: Major
Found in e2e/integration/HidingFilterOnSmallScreen.cy.ts and 1 other location - About 1 hr to fix
e2e/integration/HidingFilterOnSmallScreen.cy.ts on lines 12..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 17 locations. Consider refactoring.
Open

  {
    category: defaultInteractionTypes.find((t) => t.id === "GUARDIAN_MEETING"),
    warningLevel: warningLevels.find((level) => level.id === "OK"),
    subject: $localize`:Note demo subject:Guardians Meeting`,
    text: $localize`:Note demo text:
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 13..20
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 22..29
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 30..37
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 38..45
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 5..13
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 14..22
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 24..31
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 32..39
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 40..48
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 49..57
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 58..66
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 67..75
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 76..84
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 85..94
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 95..103
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 104..112

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 17 locations. Consider refactoring.
Open

  {
    category: defaultInteractionTypes.find((t) => t.id === "VISIT"),
    warningLevel: warningLevels.find((level) => level.id === "WARNING"),
    subject: $localize`:Note demo subject:Mother sick`,
    text: $localize`:Note demo text:
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 5..12
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 13..20
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 22..29
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 30..37
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 38..45
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 14..22
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 24..31
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 32..39
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 40..48
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 49..57
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 58..66
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 67..75
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 76..84
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 85..94
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 95..103
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 104..112

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 17 locations. Consider refactoring.
Open

  {
    category: defaultInteractionTypes.find((t) => t.id === "INCIDENT"),
    warningLevel: warningLevels.find((level) => level.id === "URGENT"),
    subject: $localize`:Note demo subject:Fight at school`,
    text: $localize`:Note demo text:
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 5..12
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 13..20
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 22..29
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 30..37
src/app/child-dev-project/notes/demo-data/notes_group-stories.ts on lines 38..45
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 5..13
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 14..22
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 24..31
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 32..39
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 40..48
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 49..57
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 58..66
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 76..84
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 85..94
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 95..103
src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts on lines 104..112

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language