inversify/InversifyJS

View on GitHub

Showing 71 of 80 total issues

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

  public whenNoAncestorIs(ancestor: (NewableFunction | string)): interfaces.BindingOnSyntax<T> {
    return this._bindingWhenSyntax.whenNoAncestorIs(ancestor);
  }
Severity: Major
Found in src/syntax/binding_when_on_syntax.ts and 5 other locations - About 50 mins to fix
src/syntax/binding_in_when_on_syntax.ts on lines 48..50
src/syntax/binding_in_when_on_syntax.ts on lines 60..62
src/syntax/binding_in_when_on_syntax.ts on lines 64..66
src/syntax/binding_when_on_syntax.ts on lines 33..35
src/syntax/binding_when_on_syntax.ts on lines 45..47

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

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

  public whenInjectedInto(parent: (NewableFunction | string)): interfaces.BindingOnSyntax<T> {
    return this._bindingWhenSyntax.whenInjectedInto(parent);
  }
Severity: Major
Found in src/syntax/binding_in_when_on_syntax.ts and 5 other locations - About 50 mins to fix
src/syntax/binding_in_when_on_syntax.ts on lines 60..62
src/syntax/binding_in_when_on_syntax.ts on lines 64..66
src/syntax/binding_when_on_syntax.ts on lines 33..35
src/syntax/binding_when_on_syntax.ts on lines 45..47
src/syntax/binding_when_on_syntax.ts on lines 49..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 51.

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

  public whenInjectedInto(parent: (NewableFunction | string)): interfaces.BindingOnSyntax<T> {
    return this._bindingWhenSyntax.whenInjectedInto(parent);
  }
Severity: Major
Found in src/syntax/binding_when_on_syntax.ts and 5 other locations - About 50 mins to fix
src/syntax/binding_in_when_on_syntax.ts on lines 48..50
src/syntax/binding_in_when_on_syntax.ts on lines 60..62
src/syntax/binding_in_when_on_syntax.ts on lines 64..66
src/syntax/binding_when_on_syntax.ts on lines 45..47
src/syntax/binding_when_on_syntax.ts on lines 49..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 51.

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 _tagParameterOrProperty has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

function _tagParameterOrProperty(
  metadataKey: string,
  annotationTarget: NewableFunction,
  key: string | symbol,
  metadata: interfaces.MetadataOrMetadataArray,
Severity: Minor
Found in src/annotation/decorator_utils.ts - About 45 mins 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 8 locations. Consider refactoring.
Open

  public whenAnyAncestorTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T> {
    return this._bindingWhenSyntax.whenAnyAncestorTagged(tag, value);
  }
Severity: Major
Found in src/syntax/binding_when_on_syntax.ts and 7 other locations - About 45 mins to fix
src/syntax/binding_in_when_on_syntax.ts on lines 44..46
src/syntax/binding_in_when_on_syntax.ts on lines 56..58
src/syntax/binding_in_when_on_syntax.ts on lines 72..74
src/syntax/binding_in_when_on_syntax.ts on lines 80..82
src/syntax/binding_when_on_syntax.ts on lines 29..31
src/syntax/binding_when_on_syntax.ts on lines 41..43
src/syntax/binding_when_on_syntax.ts on lines 65..67

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

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 _createSubRequests has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

  metadataReader: interfaces.MetadataReader,
  avoidConstraints: boolean,
  serviceIdentifier: interfaces.ServiceIdentifier,
  context: interfaces.Context,
  parentRequest: interfaces.Request | null,
Severity: Minor
Found in src/planning/planner.ts - About 45 mins to fix

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

      public whenParentTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T> {
        return this._bindingWhenSyntax.whenParentTagged(tag, value);
      }
    Severity: Major
    Found in src/syntax/binding_in_when_on_syntax.ts and 7 other locations - About 45 mins to fix
    src/syntax/binding_in_when_on_syntax.ts on lines 44..46
    src/syntax/binding_in_when_on_syntax.ts on lines 72..74
    src/syntax/binding_in_when_on_syntax.ts on lines 80..82
    src/syntax/binding_when_on_syntax.ts on lines 29..31
    src/syntax/binding_when_on_syntax.ts on lines 41..43
    src/syntax/binding_when_on_syntax.ts on lines 57..59
    src/syntax/binding_when_on_syntax.ts on lines 65..67

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

    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 _createTarget has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      isMultiInject: boolean,
      targetType: interfaces.TargetType,
      serviceIdentifier: interfaces.ServiceIdentifier,
      name: string,
      key?: string | number | symbol,
    Severity: Minor
    Found in src/planning/planner.ts - About 45 mins to fix

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

        public whenNoAncestorTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T> {
          return this._bindingWhenSyntax.whenNoAncestorTagged(tag, value);
        }
      Severity: Major
      Found in src/syntax/binding_in_when_on_syntax.ts and 7 other locations - About 45 mins to fix
      src/syntax/binding_in_when_on_syntax.ts on lines 44..46
      src/syntax/binding_in_when_on_syntax.ts on lines 56..58
      src/syntax/binding_in_when_on_syntax.ts on lines 72..74
      src/syntax/binding_when_on_syntax.ts on lines 29..31
      src/syntax/binding_when_on_syntax.ts on lines 41..43
      src/syntax/binding_when_on_syntax.ts on lines 57..59
      src/syntax/binding_when_on_syntax.ts on lines 65..67

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

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

        public whenParentTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T> {
          return this._bindingWhenSyntax.whenParentTagged(tag, value);
        }
      Severity: Major
      Found in src/syntax/binding_when_on_syntax.ts and 7 other locations - About 45 mins to fix
      src/syntax/binding_in_when_on_syntax.ts on lines 44..46
      src/syntax/binding_in_when_on_syntax.ts on lines 56..58
      src/syntax/binding_in_when_on_syntax.ts on lines 72..74
      src/syntax/binding_in_when_on_syntax.ts on lines 80..82
      src/syntax/binding_when_on_syntax.ts on lines 29..31
      src/syntax/binding_when_on_syntax.ts on lines 57..59
      src/syntax/binding_when_on_syntax.ts on lines 65..67

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

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

        public whenTargetTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T> {
          return this._bindingWhenSyntax.whenTargetTagged(tag, value);
        }
      Severity: Major
      Found in src/syntax/binding_when_on_syntax.ts and 7 other locations - About 45 mins to fix
      src/syntax/binding_in_when_on_syntax.ts on lines 44..46
      src/syntax/binding_in_when_on_syntax.ts on lines 56..58
      src/syntax/binding_in_when_on_syntax.ts on lines 72..74
      src/syntax/binding_in_when_on_syntax.ts on lines 80..82
      src/syntax/binding_when_on_syntax.ts on lines 41..43
      src/syntax/binding_when_on_syntax.ts on lines 57..59
      src/syntax/binding_when_on_syntax.ts on lines 65..67

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

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

        public whenTargetTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T> {
          return this._bindingWhenSyntax.whenTargetTagged(tag, value);
        }
      Severity: Major
      Found in src/syntax/binding_in_when_on_syntax.ts and 7 other locations - About 45 mins to fix
      src/syntax/binding_in_when_on_syntax.ts on lines 56..58
      src/syntax/binding_in_when_on_syntax.ts on lines 72..74
      src/syntax/binding_in_when_on_syntax.ts on lines 80..82
      src/syntax/binding_when_on_syntax.ts on lines 29..31
      src/syntax/binding_when_on_syntax.ts on lines 41..43
      src/syntax/binding_when_on_syntax.ts on lines 57..59
      src/syntax/binding_when_on_syntax.ts on lines 65..67

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

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

        public whenAnyAncestorTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T> {
          return this._bindingWhenSyntax.whenAnyAncestorTagged(tag, value);
        }
      Severity: Major
      Found in src/syntax/binding_in_when_on_syntax.ts and 7 other locations - About 45 mins to fix
      src/syntax/binding_in_when_on_syntax.ts on lines 44..46
      src/syntax/binding_in_when_on_syntax.ts on lines 56..58
      src/syntax/binding_in_when_on_syntax.ts on lines 80..82
      src/syntax/binding_when_on_syntax.ts on lines 29..31
      src/syntax/binding_when_on_syntax.ts on lines 41..43
      src/syntax/binding_when_on_syntax.ts on lines 57..59
      src/syntax/binding_when_on_syntax.ts on lines 65..67

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

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

        public whenNoAncestorTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T> {
          return this._bindingWhenSyntax.whenNoAncestorTagged(tag, value);
        }
      Severity: Major
      Found in src/syntax/binding_when_on_syntax.ts and 7 other locations - About 45 mins to fix
      src/syntax/binding_in_when_on_syntax.ts on lines 44..46
      src/syntax/binding_in_when_on_syntax.ts on lines 56..58
      src/syntax/binding_in_when_on_syntax.ts on lines 72..74
      src/syntax/binding_in_when_on_syntax.ts on lines 80..82
      src/syntax/binding_when_on_syntax.ts on lines 29..31
      src/syntax/binding_when_on_syntax.ts on lines 41..43
      src/syntax/binding_when_on_syntax.ts on lines 57..59

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

      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 interface BindingScopeEnum {
          Request: interfaces.BindingScope;
          Singleton: interfaces.BindingScope;
          Transient: interfaces.BindingScope;
        }
      Severity: Minor
      Found in src/interfaces/interfaces.ts and 1 other location - About 40 mins to fix
      src/interfaces/interfaces.ts on lines 35..39

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

      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 interface TargetTypeEnum {
          ConstructorArgument: interfaces.TargetType;
          ClassProperty: interfaces.TargetType;
          Variable: interfaces.TargetType;
        }
      Severity: Minor
      Found in src/interfaces/interfaces.ts and 1 other location - About 40 mins to fix
      src/interfaces/interfaces.ts on lines 18..22

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

      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 getConstructorArgsAsTargets has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        isBaseClass: boolean,
        constructorName: string,
        serviceIdentifiers: interfaces.ServiceIdentifier[],
        constructorArgsMetadata: interfaces.MetadataMap,
        iterations: number
      Severity: Minor
      Found in src/planning/reflection_utils.ts - About 35 mins to fix

        Function getConstructorArgsAsTarget has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          index: number,
          isBaseClass: boolean,
          constructorName: string,
          serviceIdentifiers: interfaces.ServiceIdentifier[],
          constructorArgsMetadata: interfaces.MetadataMap
        Severity: Minor
        Found in src/planning/reflection_utils.ts - About 35 mins to fix

          Function _getActiveBindings has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            metadataReader: interfaces.MetadataReader,
            avoidConstraints: boolean,
            context: interfaces.Context,
            parentRequest: interfaces.Request | null,
            target: interfaces.Target
          Severity: Minor
          Found in src/planning/planner.ts - About 35 mins to fix

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

                addDeactivation(
                  moduleId: ContainerModuleBase['id'],
                  serviceIdentifier: ServiceIdentifier<unknown>,
                  onDeactivation: interfaces.BindingDeactivation<unknown>
                ): void
            Severity: Minor
            Found in src/interfaces/interfaces.ts and 1 other location - About 35 mins to fix
            src/interfaces/interfaces.ts on lines 265..269

            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