emberjs/data

View on GitHub

Showing 232 of 232 total issues

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

module.exports = function (environment) {
  let ENV = {
    modulePrefix: 'record-data-encapsulation-test-app',
    environment,
    rootURL: '/',
packages/unpublished-adapter-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-debug-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-fastboot-test-app/config/environment.js on lines 3..51
packages/unpublished-model-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-relationship-performance-test-app/config/environment.js on lines 3..51
packages/unpublished-serializer-encapsulation-test-app/config/environment.js on lines 3..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 203.

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

module.exports = function (environment) {
  let ENV = {
    modulePrefix: 'adapter-encapsulation-test-app',
    environment,
    rootURL: '/',
packages/unpublished-debug-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-fastboot-test-app/config/environment.js on lines 3..51
packages/unpublished-model-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-record-data-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-relationship-performance-test-app/config/environment.js on lines 3..51
packages/unpublished-serializer-encapsulation-test-app/config/environment.js on lines 3..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 203.

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

module.exports = function (environment) {
  let ENV = {
    modulePrefix: 'serializer-encapsulation-test-app',
    environment,
    rootURL: '/',
packages/unpublished-adapter-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-debug-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-fastboot-test-app/config/environment.js on lines 3..51
packages/unpublished-model-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-record-data-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-relationship-performance-test-app/config/environment.js on lines 3..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 203.

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

module.exports = function (environment) {
  let ENV = {
    modulePrefix: 'debug-encapsulation-test-app',
    environment,
    rootURL: '/',
packages/unpublished-adapter-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-fastboot-test-app/config/environment.js on lines 3..51
packages/unpublished-model-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-record-data-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-relationship-performance-test-app/config/environment.js on lines 3..51
packages/unpublished-serializer-encapsulation-test-app/config/environment.js on lines 3..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 203.

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

module.exports = function (environment) {
  let ENV = {
    modulePrefix: 'relationship-performance-test-app',
    environment,
    rootURL: '/',
packages/unpublished-adapter-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-debug-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-fastboot-test-app/config/environment.js on lines 3..51
packages/unpublished-model-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-record-data-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-serializer-encapsulation-test-app/config/environment.js on lines 3..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 203.

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

module.exports = function (environment) {
  let ENV = {
    modulePrefix: 'fastboot-test-app',
    environment,
    rootURL: '/',
packages/unpublished-adapter-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-debug-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-model-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-record-data-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-relationship-performance-test-app/config/environment.js on lines 3..51
packages/unpublished-serializer-encapsulation-test-app/config/environment.js on lines 3..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 203.

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

module.exports = function (environment) {
  let ENV = {
    modulePrefix: 'model-encapsulation-test-app',
    environment,
    rootURL: '/',
packages/unpublished-adapter-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-debug-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-fastboot-test-app/config/environment.js on lines 3..51
packages/unpublished-record-data-encapsulation-test-app/config/environment.js on lines 3..51
packages/unpublished-relationship-performance-test-app/config/environment.js on lines 3..51
packages/unpublished-serializer-encapsulation-test-app/config/environment.js on lines 3..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 203.

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

CoreStore has 69 functions (exceeds 50 allowed). Consider refactoring.
Open

abstract class CoreStore extends Service {
  /**
   * Ember Data uses several specialized micro-queues for organizing
    and coalescing similar async work.

Severity: Major
Found in packages/store/addon/-private/system/core-store.ts - About 5 hrs to fix

    InternalModel has 66 functions (exceeds 50 allowed). Consider refactoring.
    Open

    export default class InternalModel {
      declare _id: string | null;
      declare modelName: string;
      declare clientId: string;
      declare __recordData: RecordData | null;
    Severity: Major
    Found in packages/store/addon/-private/system/model/internal-model.ts - About 4 hrs to fix

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

      export function isRHS(info: EdgeDefinition, type: string, key: string): boolean {
        let isSelfReferential = info.isSelfReferential;
        let isRelationship = key === info.rhs_relationshipName;
      
        if (isRelationship === true) {
      packages/record-data/addon/-private/graph/-edge-definition.ts on lines 88..102

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

      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

        eachRelationship<T>(
          callback: (this: T | undefined, key: string, relationship: RelationshipSchema) => void,
          binding?: T
        ) {
          let relationshipDefs = this.__store._relationshipsDefinitionFor({ type: this.modelName });
      packages/store/addon/-private/system/model/shim-model-class.ts on lines 57..62

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

      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 function isLHS(info: EdgeDefinition, type: string, key: string): boolean {
        let isSelfReferential = info.isSelfReferential;
        let isRelationship = key === info.lhs_relationshipName;
      
        if (isRelationship === true) {
      packages/record-data/addon/-private/graph/-edge-definition.ts on lines 104..118

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

      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

        eachAttribute<T>(callback: (this: T | undefined, key: string, attribute: AttributeSchema) => void, binding?: T) {
          let attrDefs = this.__store._attributesDefinitionFor({ type: this.modelName });
          Object.keys(attrDefs).forEach((key) => {
            callback.call(binding, key, attrDefs[key] as AttributeSchema);
          });
      packages/store/addon/-private/system/model/shim-model-class.ts on lines 64..72

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

      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

          if (Array.isArray(relationshipHash.data)) {
            let ret = new Array(relationshipHash.data.length);
      
            for (let i = 0; i < relationshipHash.data.length; i++) {
              let data = relationshipHash.data[i];
      Severity: Major
      Found in packages/serializer/addon/json-api.js and 1 other location - About 3 hrs to fix
      packages/serializer/addon/json-api.js on lines 143..152

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

      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

        eachAttribute(callback: (key: string, meta: AttributeSchema) => void, binding?: unknown): void {
          let attrDefs = this._store._attributesDefinitionFor(this.identifier);
          Object.keys(attrDefs).forEach((key) => {
            callback.call(binding, key, attrDefs[key] as AttributeSchema);
          });
      Severity: Major
      Found in packages/store/addon/-private/system/snapshot.ts and 1 other location - About 3 hrs to fix
      packages/store/addon/-private/system/snapshot.ts on lines 519..524

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

      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

        eachRelationship(callback: (key: string, meta: RelationshipSchema) => void, binding?: unknown): void {
          let relationshipDefs = this._store._relationshipsDefinitionFor(this.identifier);
          Object.keys(relationshipDefs).forEach((key) => {
            callback.call(binding, key, relationshipDefs[key] as RelationshipSchema);
          });
      Severity: Major
      Found in packages/store/addon/-private/system/snapshot.ts and 1 other location - About 3 hrs to fix
      packages/store/addon/-private/system/snapshot.ts on lines 495..500

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

      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

          } else if (Array.isArray(documentHash.data)) {
            let ret = new Array(documentHash.data.length);
      
            for (let i = 0; i < documentHash.data.length; i++) {
              let data = documentHash.data[i];
      Severity: Major
      Found in packages/serializer/addon/json-api.js and 1 other location - About 3 hrs to fix
      packages/serializer/addon/json-api.js on lines 293..302

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

      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

        return {
          result: passed,
          actual: { id: config.id, count: matchedWarnings.length },
          expected: { id: config.id, count: expectedCount },
          message:
      packages/unpublished-test-infra/addon-test-support/qunit-asserts/assert-deprecation.ts on lines 86..95

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

      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

        return {
          result: passed,
          actual: { id: config.id, count: matchedDeprecations.length },
          expected: { id: config.id, count: expectedCount },
          message:
      packages/unpublished-test-infra/addon-test-support/qunit-asserts/assert-warning.ts on lines 69..78

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

      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

      Consider simplifying this complex logical expression.
      Open

          if (HAS_RECORD_DATA_PACKAGE) {
            if (!resource) {
              return resolve();
            }
            const { definition, state } = relationship;
      Severity: Critical
      Found in packages/store/addon/-private/system/core-store.ts - About 3 hrs to fix
        Severity
        Category
        Status
        Source
        Language