cityssm/lottery-licence-manager

View on GitHub

Showing 390 of 460 total issues

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

      cityssm.postJSON(urlPrefix + "/locations/doDelete", {
        locationID
      },
        (responseJSON: {
          success: boolean;
Severity: Major
Found in public-typescript/location-cleanup.ts and 1 other location - About 4 hrs to fix
public-typescript/organization-cleanup.ts on lines 30..43

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 117.

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

      cityssm.postJSON(urlPrefix + "/organizations/doDelete", {
        organizationID
      },
        (responseJSON: { success: boolean; message: string }) => {

Severity: Major
Found in public-typescript/organization-cleanup.ts and 1 other location - About 4 hrs to fix
public-typescript/location-cleanup.ts on lines 26..41

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 117.

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

export const handler = (request, response, next) => {
    const organizationID = Number(request.params.organizationID);
    if (Number.isNaN(organizationID)) {
        return next();
    }
Severity: Major
Found in handlers/organizations-post/doAddRepresentative.js and 1 other location - About 4 hrs to fix
handlers/organizations-post/doUpdateRepresentative.js on lines 2..16

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 116.

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

export const handler = (request, response, next) => {
    const organizationID = Number(request.params.organizationID);
    if (Number.isNaN(organizationID)) {
        return next();
    }
Severity: Major
Found in handlers/organizations-post/doUpdateRepresentative.js and 1 other location - About 4 hrs to fix
handlers/organizations-post/doAddRepresentative.js on lines 2..16

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 116.

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

    const submitFunction = (formEvent: Event) => {

      formEvent.preventDefault();

      cityssm.postJSON(urlPrefix + "/organizations/doEditReminder",
Severity: Major
Found in public-typescript/main-organizationReminders.ts and 1 other location - About 4 hrs to fix
public-typescript/main-organizationReminders.ts on lines 83..99

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 116.

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

    const submitFunction = (formEvent: Event) => {
      formEvent.preventDefault();

      cityssm.postJSON(urlPrefix + "/organizations/doAddReminder",
        formEvent.currentTarget,
Severity: Major
Found in public-typescript/main-organizationReminders.ts and 1 other location - About 4 hrs to fix
public-typescript/main-organizationReminders.ts on lines 198..218

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 116.

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 3 locations. Consider refactoring.
Open

  const deleteReminder = (organizationID: number, reminderIndex: number, doConfirm: boolean,
    deleteCallbackFunction: (response: {
      success: boolean;
      message: string;
    }) => void) => {
Severity: Major
Found in public-typescript/main-organizationReminders.ts and 2 other locations - About 3 hrs to fix
public-typescript/main-organizationRemarks.ts on lines 150..171
public-typescript/main-organizationReminders.ts on lines 418..439

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 106.

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 3 locations. Consider refactoring.
Open

  const dismissReminder = (organizationID: number, reminderIndex: number, doConfirm: boolean,
    dismissCallbackFunction: (response: {
      success: boolean;
      message: string;
    }) => void) => {
Severity: Major
Found in public-typescript/main-organizationReminders.ts and 2 other locations - About 3 hrs to fix
public-typescript/main-organizationRemarks.ts on lines 150..171
public-typescript/main-organizationReminders.ts on lines 455..476

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 106.

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 3 locations. Consider refactoring.
Open

  const deleteRemark = (organizationID: number, remarkIndex: number, doConfirm: boolean,
    deleteCallbackFunction: (response: {
      success: boolean;
      message: string;
    }) => void) => {
Severity: Major
Found in public-typescript/main-organizationRemarks.ts and 2 other locations - About 3 hrs to fix
public-typescript/main-organizationReminders.ts on lines 418..439
public-typescript/main-organizationReminders.ts on lines 455..476

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 106.

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 5 locations. Consider refactoring.
Open

export const getMaxOrganizationReminderIndexWithDB = (database: sqlite.Database, organizationID: number | string): number => {

  const result: {
    reminderIndex: number;
  } = database.prepare("select reminderIndex" +
Severity: Major
Found in helpers/licencesDB/getMaxOrganizationReminderIndex.ts and 4 other locations - About 3 hrs to fix
helpers/licencesDB/getMaxLicenceAmendmentIndex.ts on lines 4..18
helpers/licencesDB/getMaxLicenceTicketTypeIndex.ts on lines 4..18
helpers/licencesDB/getMaxOrganizationBankRecordIndex.ts on lines 4..18
helpers/licencesDB/getMaxTransactionIndex.ts on lines 4..18

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 104.

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 5 locations. Consider refactoring.
Open

export const getMaxLicenceTicketTypeIndexWithDB = (database: sqlite.Database, licenceID: number | string): number => {

  const result: {
    ticketTypeIndex: number;
  } = database.prepare("select ticketTypeIndex" +
Severity: Major
Found in helpers/licencesDB/getMaxLicenceTicketTypeIndex.ts and 4 other locations - About 3 hrs to fix
helpers/licencesDB/getMaxLicenceAmendmentIndex.ts on lines 4..18
helpers/licencesDB/getMaxOrganizationBankRecordIndex.ts on lines 4..18
helpers/licencesDB/getMaxOrganizationReminderIndex.ts on lines 4..18
helpers/licencesDB/getMaxTransactionIndex.ts on lines 4..18

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 104.

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 5 locations. Consider refactoring.
Open

export const getMaxOrganizationBankRecordIndexWithDB = (database: sqlite.Database, organizationID: number | string): number => {

  const result: {
    recordIndex: number;
  } = database.prepare("select recordIndex" +
Severity: Major
Found in helpers/licencesDB/getMaxOrganizationBankRecordIndex.ts and 4 other locations - About 3 hrs to fix
helpers/licencesDB/getMaxLicenceAmendmentIndex.ts on lines 4..18
helpers/licencesDB/getMaxLicenceTicketTypeIndex.ts on lines 4..18
helpers/licencesDB/getMaxOrganizationReminderIndex.ts on lines 4..18
helpers/licencesDB/getMaxTransactionIndex.ts on lines 4..18

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 104.

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 5 locations. Consider refactoring.
Open

export const getMaxTransactionIndexWithDB = (database: sqlite.Database, licenceID: number | string): number => {

  const result: {
    transactionIndex: number;
  } = database.prepare("select transactionIndex" +
Severity: Major
Found in helpers/licencesDB/getMaxTransactionIndex.ts and 4 other locations - About 3 hrs to fix
helpers/licencesDB/getMaxLicenceAmendmentIndex.ts on lines 4..18
helpers/licencesDB/getMaxLicenceTicketTypeIndex.ts on lines 4..18
helpers/licencesDB/getMaxOrganizationBankRecordIndex.ts on lines 4..18
helpers/licencesDB/getMaxOrganizationReminderIndex.ts on lines 4..18

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 104.

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 5 locations. Consider refactoring.
Open

export const getMaxLicenceAmendmentIndexWithDB = (database: sqlite.Database, licenceID: number | string): number => {

  const result: {
    amendmentIndex: number;
  } = database.prepare("select amendmentIndex" +
Severity: Major
Found in helpers/licencesDB/getMaxLicenceAmendmentIndex.ts and 4 other locations - About 3 hrs to fix
helpers/licencesDB/getMaxLicenceTicketTypeIndex.ts on lines 4..18
helpers/licencesDB/getMaxOrganizationBankRecordIndex.ts on lines 4..18
helpers/licencesDB/getMaxOrganizationReminderIndex.ts on lines 4..18
helpers/licencesDB/getMaxTransactionIndex.ts on lines 4..18

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 104.

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 11 locations. Consider refactoring.
Open

describe("Event Search", () => {
    before(() => {
        logout();
        login(testView);
        cy.visit("/events");
Severity: Major
Found in cypress/e2e/03-readOnly/eventSearch.cy.js and 10 other locations - About 3 hrs to fix
cypress/e2e/01-admin/organizationRecovery.cy.js on lines 3..15
cypress/e2e/02-update/locationCleanup.cy.js on lines 3..15
cypress/e2e/02-update/organizationCleanup.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventFinancial.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventOutstanding.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventRecent.cy.js on lines 3..15
cypress/e2e/03-readOnly/licenceSearch.cy.js on lines 3..15
cypress/e2e/03-readOnly/locationSearch.cy.js on lines 3..15
cypress/e2e/03-readOnly/organizationReminders.cy.js on lines 3..15
cypress/e2e/03-readOnly/organizationSearch.cy.js on lines 3..15

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 100.

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 11 locations. Consider refactoring.
Open

describe("Organization Cleanup", () => {
    before(() => {
        logout();
        login(testUpdate);
        cy.visit("/organizations/cleanup");
Severity: Major
Found in cypress/e2e/02-update/organizationCleanup.cy.js and 10 other locations - About 3 hrs to fix
cypress/e2e/01-admin/organizationRecovery.cy.js on lines 3..15
cypress/e2e/02-update/locationCleanup.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventFinancial.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventOutstanding.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventRecent.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventSearch.cy.js on lines 3..15
cypress/e2e/03-readOnly/licenceSearch.cy.js on lines 3..15
cypress/e2e/03-readOnly/locationSearch.cy.js on lines 3..15
cypress/e2e/03-readOnly/organizationReminders.cy.js on lines 3..15
cypress/e2e/03-readOnly/organizationSearch.cy.js on lines 3..15

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 100.

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 11 locations. Consider refactoring.
Open

describe("Organization Recovery", () => {
    before(() => {
        logout();
        login(testAdmin);
        cy.visit("/organizations/recovery");
Severity: Major
Found in cypress/e2e/01-admin/organizationRecovery.cy.js and 10 other locations - About 3 hrs to fix
cypress/e2e/02-update/locationCleanup.cy.js on lines 3..15
cypress/e2e/02-update/organizationCleanup.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventFinancial.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventOutstanding.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventRecent.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventSearch.cy.js on lines 3..15
cypress/e2e/03-readOnly/licenceSearch.cy.js on lines 3..15
cypress/e2e/03-readOnly/locationSearch.cy.js on lines 3..15
cypress/e2e/03-readOnly/organizationReminders.cy.js on lines 3..15
cypress/e2e/03-readOnly/organizationSearch.cy.js on lines 3..15

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 100.

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 11 locations. Consider refactoring.
Open

describe("Event Financial Summary", () => {
    before(() => {
        logout();
        login(testView);
        cy.visit("/events/financials");
Severity: Major
Found in cypress/e2e/03-readOnly/eventFinancial.cy.js and 10 other locations - About 3 hrs to fix
cypress/e2e/01-admin/organizationRecovery.cy.js on lines 3..15
cypress/e2e/02-update/locationCleanup.cy.js on lines 3..15
cypress/e2e/02-update/organizationCleanup.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventOutstanding.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventRecent.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventSearch.cy.js on lines 3..15
cypress/e2e/03-readOnly/licenceSearch.cy.js on lines 3..15
cypress/e2e/03-readOnly/locationSearch.cy.js on lines 3..15
cypress/e2e/03-readOnly/organizationReminders.cy.js on lines 3..15
cypress/e2e/03-readOnly/organizationSearch.cy.js on lines 3..15

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 100.

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 11 locations. Consider refactoring.
Open

describe("Organization Search", () => {
    before(() => {
        logout();
        login(testView);
        cy.visit("/organizations");
Severity: Major
Found in cypress/e2e/03-readOnly/organizationSearch.cy.js and 10 other locations - About 3 hrs to fix
cypress/e2e/01-admin/organizationRecovery.cy.js on lines 3..15
cypress/e2e/02-update/locationCleanup.cy.js on lines 3..15
cypress/e2e/02-update/organizationCleanup.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventFinancial.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventOutstanding.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventRecent.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventSearch.cy.js on lines 3..15
cypress/e2e/03-readOnly/licenceSearch.cy.js on lines 3..15
cypress/e2e/03-readOnly/locationSearch.cy.js on lines 3..15
cypress/e2e/03-readOnly/organizationReminders.cy.js on lines 3..15

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 100.

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 11 locations. Consider refactoring.
Open

describe("Organization Reminders", () => {
    before(() => {
        logout();
        login(testView);
        cy.visit("/organizations/reminders");
Severity: Major
Found in cypress/e2e/03-readOnly/organizationReminders.cy.js and 10 other locations - About 3 hrs to fix
cypress/e2e/01-admin/organizationRecovery.cy.js on lines 3..15
cypress/e2e/02-update/locationCleanup.cy.js on lines 3..15
cypress/e2e/02-update/organizationCleanup.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventFinancial.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventOutstanding.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventRecent.cy.js on lines 3..15
cypress/e2e/03-readOnly/eventSearch.cy.js on lines 3..15
cypress/e2e/03-readOnly/licenceSearch.cy.js on lines 3..15
cypress/e2e/03-readOnly/locationSearch.cy.js on lines 3..15
cypress/e2e/03-readOnly/organizationSearch.cy.js on lines 3..15

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 100.

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