domjtalbot/nx-mesh

View on GitHub

Showing 553 of 553 total issues

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

export async function getServeLocation(options: StartExecutorSchema) {
  let port = options.port.number ?? 4200;
  const isRange = options.port.range !== undefined;
  const range = getPort.makeRange(
    options.port.range?.from ?? 1024,
packages/nx-mesh/src/executors/dev/lib/get-serve-location.ts on lines 5..31

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

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 async function getServeLocation(options: DevExecutorSchema) {
  let port = options.port.number ?? 4200;
  const isRange = options.port.range !== undefined;
  const range = getPort.makeRange(
    options.port.range?.from ?? 1024,
Severity: Major
Found in packages/nx-mesh/src/executors/dev/lib/get-serve-location.ts and 1 other location - About 1 day to fix
packages/nx-mesh/src/executors/start/lib/get-serve-location.ts on lines 5..31

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

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

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

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

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

Refactorings

Further Reading

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

    describe('start', () => {
      it('should return empty objects by default', () => {
        const result = getCommandOptions<'start'>({
          args: {},
          env: {},
Severity: Major
Found in packages/nx-mesh/src/utils/mesh-cli/commands.spec.ts and 1 other location - About 1 day to fix
packages/nx-mesh/src/utils/mesh-cli/commands.spec.ts on lines 42..77

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

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

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

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

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

Refactorings

Further Reading

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

    describe('dev', () => {
      it('should return empty objects by default', () => {
        const result = getCommandOptions<'dev'>({
          args: {},
          env: {},
Severity: Major
Found in packages/nx-mesh/src/utils/mesh-cli/commands.spec.ts and 1 other location - About 1 day to fix
packages/nx-mesh/src/utils/mesh-cli/commands.spec.ts on lines 114..149

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

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

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

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

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

Refactorings

Further Reading

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

    it(`should add codegen dependencies to the package.json`, () => {
      addDependencies(tree, {
        codegen: true,
        example,
      });
packages/nx-mesh/src/generators/utils/create-mesh-example/add-dependencies.spec.ts on lines 96..125

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

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

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

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

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

Refactorings

Further Reading

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

    it(`should not add codegen dependencies to the package.json`, () => {
      addDependencies(tree, {
        codegen: false,
        example,
      });
packages/nx-mesh/src/generators/utils/create-mesh-example/add-dependencies.spec.ts on lines 65..94

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

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

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

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

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

Refactorings

Further Reading

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

    describe('serve-source', () => {
      it('should return empty objects by default', () => {
        const result = getCommandOptions<'serve-source'>({
          args: {},
          env: {},
Severity: Major
Found in packages/nx-mesh/src/utils/mesh-cli/commands.spec.ts and 1 other location - About 7 hrs to fix
packages/nx-mesh/src/utils/mesh-cli/commands.spec.ts on lines 151..184

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

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

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

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

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

Refactorings

Further Reading

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

    describe('validate', () => {
      it('should return empty objects by default', () => {
        const result = getCommandOptions<'validate'>({
          args: {},
          env: {},
Severity: Major
Found in packages/nx-mesh/src/utils/mesh-cli/commands.spec.ts and 1 other location - About 7 hrs to fix
packages/nx-mesh/src/utils/mesh-cli/commands.spec.ts on lines 79..112

Duplicated Code

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

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

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

Tuning

This issue has a mass of 188.

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

describe('devHasher', () => {
  it('should generate hash', async () => {
    const mockHasher: Hasher = {
      hashTask: jest.fn().mockReturnValue({ value: 'hashed-task' }),
    } as unknown as Hasher;
Severity: Major
Found in packages/nx-mesh/src/executors/dev/hasher.spec.ts and 6 other locations - About 6 hrs to fix
packages/nx-mesh/src/executors/build-gateway/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/build-swc/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/build/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/start/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/validate/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/serve/hasher.spec.ts on lines 5..25

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

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

describe('serveHasher', () => {
  it('should generate hash', async () => {
    const mockHasher: Hasher = {
      hashTask: jest.fn().mockReturnValue({ value: 'hashed-task' }),
    } as unknown as Hasher;
Severity: Major
Found in packages/nx-mesh/src/executors/serve/hasher.spec.ts and 6 other locations - About 6 hrs to fix
packages/nx-mesh/src/executors/build-gateway/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/build-swc/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/build/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/start/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/validate/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/dev/hasher.spec.ts on lines 5..25

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

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

describe('validateHasher', () => {
  it('should generate hash', async () => {
    const mockHasher: Hasher = {
      hashTask: jest.fn().mockReturnValue({ value: 'hashed-task' }),
    } as unknown as Hasher;
Severity: Major
Found in packages/nx-mesh/src/executors/validate/hasher.spec.ts and 6 other locations - About 6 hrs to fix
packages/nx-mesh/src/executors/build-gateway/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/build-swc/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/build/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/start/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/dev/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/serve/hasher.spec.ts on lines 5..25

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

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

describe('buildGatewayHasher', () => {
  it('should generate hash', async () => {
    const mockHasher: Hasher = {
      hashTask: jest.fn().mockReturnValue({ value: 'hashed-task' }),
    } as unknown as Hasher;
Severity: Major
Found in packages/nx-mesh/src/executors/build-gateway/hasher.spec.ts and 6 other locations - About 6 hrs to fix
packages/nx-mesh/src/executors/build-swc/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/build/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/start/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/validate/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/dev/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/serve/hasher.spec.ts on lines 5..25

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

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

describe('startHasher', () => {
  it('should generate hash', async () => {
    const mockHasher: Hasher = {
      hashTask: jest.fn().mockReturnValue({ value: 'hashed-task' }),
    } as unknown as Hasher;
Severity: Major
Found in packages/nx-mesh/src/executors/start/hasher.spec.ts and 6 other locations - About 6 hrs to fix
packages/nx-mesh/src/executors/build-gateway/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/build-swc/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/build/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/validate/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/dev/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/serve/hasher.spec.ts on lines 5..25

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

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

describe('buildHasher', () => {
  it('should generate hash', async () => {
    const mockHasher: Hasher = {
      hashTask: jest.fn().mockReturnValue({ value: 'hashed-task' }),
    } as unknown as Hasher;
Severity: Major
Found in packages/nx-mesh/src/executors/build/hasher.spec.ts and 6 other locations - About 6 hrs to fix
packages/nx-mesh/src/executors/build-gateway/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/build-swc/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/start/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/validate/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/dev/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/serve/hasher.spec.ts on lines 5..25

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

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

describe('buildSwcHasher', () => {
  it('should generate hash', async () => {
    const mockHasher: Hasher = {
      hashTask: jest.fn().mockReturnValue({ value: 'hashed-task' }),
    } as unknown as Hasher;
Severity: Major
Found in packages/nx-mesh/src/executors/build-swc/hasher.spec.ts and 6 other locations - About 6 hrs to fix
packages/nx-mesh/src/executors/build-gateway/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/build/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/start/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/validate/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/dev/hasher.spec.ts on lines 5..25
packages/nx-mesh/src/executors/serve/hasher.spec.ts on lines 5..25

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

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

  describe('rfam', () => {
    it('should create a src folder supplementary files', () => {
      const expectedPaths = ['src/graphql/getAlignmentTree.query.graphql'];

      createSharedFiles(tree, {
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 58..78
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 107..127
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 151..171
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 173..193

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

  describe('trippin', () => {
    it('should create a src folder supplementary files', () => {
      const expectedPaths = ['src/graphql/airports/getAirports.query.graphql'];

      createSharedFiles(tree, {
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 58..78
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 107..127
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 129..149
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 151..171

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

  describe('country-info', () => {
    it('should create a src folder supplementary files', () => {
      const expectedPaths = ['src/graphql/GetLanguages.query.graphql'];

      createSharedFiles(tree, {
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 107..127
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 129..149
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 151..171
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 173..193

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

  describe('star-wars', () => {
    it('should create a src folder supplementary files', () => {
      const expectedPaths = ['src/graphql/getMovies.query.graphql'];

      createSharedFiles(tree, {
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 58..78
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 107..127
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 129..149
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 173..193

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

  describe('movies', () => {
    it('should create a src folder supplementary files', () => {
      const expectedPaths = ['src/graphql/example.query.graphql'];

      createSharedFiles(tree, {
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 58..78
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 129..149
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 151..171
packages/nx-mesh/src/generators/utils/create-mesh-example/create-shared-files.spec.ts on lines 173..193

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

Severity
Category
Status
Source
Language