Showing 29 of 29 total issues

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

export const createToManyRelationshipMetadata = ({
  options: { key, type, cascade, backRef },
  property,
}: {
  options: RelationshipOptions;
Severity: Major
Found in src/Relationship/relationshipMetadata.ts and 1 other location - About 5 hrs to fix
src/Relationship/relationshipMetadata.ts on lines 35..51

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

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 createToOneRelationshipMetadata = ({
  options: { key, type, cascade, backRef },
  property,
}: {
  options: RelationshipOptions;
Severity: Major
Found in src/Relationship/relationshipMetadata.ts and 1 other location - About 5 hrs to fix
src/Relationship/relationshipMetadata.ts on lines 53..69

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

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

Function repositoryDelete has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

export const repositoryDelete = async (
  instance: BaseEntity
): Promise<boolean> => {
  const { constructor } = getConstructorDatastoreCache(instance);
  const columnMetadatas = getColumnMetadatas(constructor);
Severity: Minor
Found in src/Repository/repositoryDelete.ts - About 3 hrs to fix

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

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

export class ColumnNotFindableError extends KVORMError {
  constructor(
    constructor: EntityConstructor,
    columnMetadata: ColumnMetadata,
    message = `Unknown Error`
Severity: Major
Found in src/Repository/ColumnNotFindableError.ts and 1 other location - About 3 hrs to fix
src/Repository/ColumnNotSearchableError.ts on lines 5..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 98.

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 class ColumnNotSearchableError extends KVORMError {
  constructor(
    constructor: EntityConstructor,
    columnMetadata: ColumnMetadata,
    message = `Unknown Error`
Severity: Major
Found in src/Repository/ColumnNotSearchableError.ts and 1 other location - About 3 hrs to fix
src/Repository/ColumnNotFindableError.ts on lines 5..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 98.

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 class ColumnLookupError extends MetadataError {
  constructor(
    constructor: EntityConstructor,
    property: PropertyKey,
    message = `Unknown Error`
Severity: Major
Found in src/utils/errors.ts and 1 other location - About 2 hrs to fix
src/utils/errors.ts on lines 63..76

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

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 class RelationshipLookupError extends MetadataError {
  constructor(
    constructor: EntityConstructor,
    property: PropertyKey,
    message = `Unknown Error`
Severity: Major
Found in src/utils/errors.ts and 1 other location - About 2 hrs to fix
src/utils/errors.ts on lines 48..61

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

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

Function repositoryDelete has 64 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const repositoryDelete = async (
  instance: BaseEntity
): Promise<boolean> => {
  const { constructor } = getConstructorDatastoreCache(instance);
  const columnMetadatas = getColumnMetadatas(constructor);
Severity: Major
Found in src/Repository/repositoryDelete.ts - About 2 hrs to fix

    Function repositorySave has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
    Open

    export const repositorySave = async (
      instance: BaseEntity,
      {
        skipRelationshipMetadatas,
      }: { skipRelationshipMetadatas: RelationshipMetadata[] } = {
    Severity: Minor
    Found in src/Repository/repositorySave.ts - About 2 hrs to fix

    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

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

    export const getToOneRelationshipMetadata = (
      constructor: EntityConstructor,
      property: PropertyKey
    ): ToOneRelationshipMetadata => {
      const toOneRelationshipMetadatas = getToOneRelationshipMetadatas(constructor);
    Severity: Major
    Found in src/utils/relationships.ts and 2 other locations - About 2 hrs to fix
    src/utils/columns.ts on lines 16..28
    src/utils/relationships.ts on lines 43..57

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

    export const getToManyRelationshipMetadata = (
      constructor: EntityConstructor,
      property: PropertyKey
    ): ToManyRelationshipMetadata => {
      const toManyRelationshipMetadatas = getToManyRelationshipMetadatas(
    Severity: Major
    Found in src/utils/relationships.ts and 2 other locations - About 2 hrs to fix
    src/utils/columns.ts on lines 16..28
    src/utils/relationships.ts on lines 29..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 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 3 locations. Consider refactoring.
    Open

    export const getColumnMetadata = (
      constructor: EntityConstructor,
      property: PropertyKey
    ): ColumnMetadata => {
      const columnMetadatas = getColumnMetadatas(constructor);
    Severity: Major
    Found in src/utils/columns.ts and 2 other locations - About 2 hrs to fix
    src/utils/relationships.ts on lines 29..41
    src/utils/relationships.ts on lines 43..57

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

    export class PrimaryColumnMissingError extends MetadataError {
      constructor(
        constructor: EntityConstructor,
        message = `PrimaryColumn Missing`
      ) {
    Severity: Major
    Found in src/utils/errors.ts and 4 other locations - About 2 hrs to fix
    src/Datastore/SearchStrategyError.ts on lines 4..11
    src/Repository/RepositoryFindError.ts on lines 4..9
    src/Repository/RepositoryLoadError.ts on lines 4..9
    src/utils/errors.ts on lines 41..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 76.

    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 class RepositoryLoadError extends KVORMError {
      constructor(constructor: EntityConstructor, message = `Unknown Error`) {
        super(`Could not load Entity, ${constructor.name}: ${message}`);
        this.name = `RepositoryLoadError`;
      }
    Severity: Major
    Found in src/Repository/RepositoryLoadError.ts and 4 other locations - About 2 hrs to fix
    src/Datastore/SearchStrategyError.ts on lines 4..11
    src/Repository/RepositoryFindError.ts on lines 4..9
    src/utils/errors.ts on lines 41..46
    src/utils/errors.ts on lines 78..86

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

    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 class RepositoryFindError extends KVORMError {
      constructor(constructor: EntityConstructor, message = `Unknown Error`) {
        super(`Could not find Entity, ${constructor.name}: ${message}`);
        this.name = `RepositoryFindError`;
      }
    Severity: Major
    Found in src/Repository/RepositoryFindError.ts and 4 other locations - About 2 hrs to fix
    src/Datastore/SearchStrategyError.ts on lines 4..11
    src/Repository/RepositoryLoadError.ts on lines 4..9
    src/utils/errors.ts on lines 41..46
    src/utils/errors.ts on lines 78..86

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

    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 class SearchStrategyError extends KVORMError {
      constructor(searchStrategy: SearchStrategy, message = `Unknown Error`) {
        super(
          `Error using Search Strategy, ${SearchStrategy[searchStrategy]}: ${message}`
        );
    Severity: Major
    Found in src/Datastore/SearchStrategyError.ts and 4 other locations - About 2 hrs to fix
    src/Repository/RepositoryFindError.ts on lines 4..9
    src/Repository/RepositoryLoadError.ts on lines 4..9
    src/utils/errors.ts on lines 41..46
    src/utils/errors.ts on lines 78..86

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

    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 class EntityLookupError extends MetadataError {
      constructor(constructor: EntityConstructor, message = `Unknown Error`) {
        super(`Error looking up Entity, ${constructor.name}: ${message}`);
        this.name = `EntityLookupError`;
      }
    Severity: Major
    Found in src/utils/errors.ts and 4 other locations - About 2 hrs to fix
    src/Datastore/SearchStrategyError.ts on lines 4..11
    src/Repository/RepositoryFindError.ts on lines 4..9
    src/Repository/RepositoryLoadError.ts on lines 4..9
    src/utils/errors.ts on lines 78..86

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

    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

    Function toManySet has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

    export const toManySet = async (
      instance: BaseEntity,
      toManyRelationshipMetadata: ToManyRelationshipMetadata,
      values: BaseEntity[],
      { skipBackRef }: { skipBackRef: boolean } = { skipBackRef: false }
    Severity: Minor
    Found in src/Relationship/toManySet.ts - About 1 hr to fix

    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

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

    export class SetupError extends KVORMError {
      constructor(message: string) {
        super(message);
        this.name = `SetupError`;
      }
    Severity: Minor
    Found in src/utils/errors.ts and 1 other location - About 35 mins to fix
    src/utils/errors.ts on lines 18..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 47.

    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 class MetadataError extends KVORMError {
      constructor(message: string) {
        super(message);
        this.name = `MetadataError`;
      }
    Severity: Minor
    Found in src/utils/errors.ts and 1 other location - About 35 mins to fix
    src/utils/errors.ts on lines 11..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 47.

    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