cucumber/cucumber-js

View on GitHub

Showing 172 of 172 total issues

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

  describe('After', () => {
    describe('function only', () => {
      it('adds a test case hook definition', function() {
        // Arrange
        const hook = function(): void {} // eslint-disable-line @typescript-eslint/no-empty-function
Severity: Major
Found in src/support_code_library_builder/index_spec.ts and 1 other location - About 5 days to fix
src/support_code_library_builder/index_spec.ts on lines 171..257

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

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('this.Before', () => {
    describe('function only', () => {
      it('adds a scenario hook definition', function() {
        // Arrange
        const hook = function(): void {} // eslint-disable-line @typescript-eslint/no-empty-function
Severity: Major
Found in src/support_code_library_builder/index_spec.ts and 1 other location - About 5 days to fix
src/support_code_library_builder/index_spec.ts on lines 83..169

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

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('should have tag A and B', () => {
        beforeEach(function() {
          pickleFilter = new PickleFilter({
            cwd,
            featurePaths: ['features'],
Severity: Major
Found in src/pickle_filter_spec.ts and 1 other location - About 3 days to fix
src/pickle_filter_spec.ts on lines 418..504

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

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('should have tag A or B', () => {
        beforeEach(function() {
          pickleFilter = new PickleFilter({
            cwd: cwd,
            featurePaths: ['features'],
Severity: Major
Found in src/pickle_filter_spec.ts and 1 other location - About 3 days to fix
src/pickle_filter_spec.ts on lines 330..416

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

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('should not have tag A', () => {
        beforeEach(function() {
          pickleFilter = new PickleFilter({
            cwd,
            featurePaths: ['features'],
Severity: Major
Found in src/pickle_filter_spec.ts and 1 other location - About 1 day to fix
src/pickle_filter_spec.ts on lines 236..281

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

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('should have tag A', () => {
        beforeEach(function() {
          pickleFilter = new PickleFilter({
            cwd: cwd,
            featurePaths: ['features'],
Severity: Major
Found in src/pickle_filter_spec.ts and 1 other location - About 1 day to fix
src/pickle_filter_spec.ts on lines 283..328

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

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('with a duration of 123 seconds', () => {
      it('outputs the duration as 2m03.000s', async () => {
        // Arrange
        const sourceData = [
          'Feature: a',
Severity: Major
Found in src/formatter/helpers/summary_helpers_spec.ts and 1 other location - About 6 hrs to fix
src/formatter/helpers/summary_helpers_spec.ts on lines 230..257

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

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('with a duration of 12.3 seconds', () => {
      it('outputs the duration as 0m12.300s', async () => {
        // Arrange
        const sourceData = [
          'Feature: a',
Severity: Major
Found in src/formatter/helpers/summary_helpers_spec.ts and 1 other location - About 6 hrs to fix
src/formatter/helpers/summary_helpers_spec.ts on lines 259..286

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

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

File pickle_filter_spec.ts has 425 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { beforeEach, describe, it } from 'mocha'
import { expect } from 'chai'
import PickleFilter from './pickle_filter'
import path from 'path'
import { parse } from '../test/gherkin_helpers'
Severity: Minor
Found in src/pickle_filter_spec.ts - About 6 hrs to fix

    File pickle_runner_spec.ts has 425 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { afterEach, beforeEach, describe, it } from 'mocha'
    import { expect } from 'chai'
    import PickleRunner from './pickle_runner'
    import Status from '../status'
    import { EventEmitter } from 'events'
    Severity: Minor
    Found in src/runtime/pickle_runner_spec.ts - About 6 hrs to fix

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

          describe('failed', () => {
            it('prints the error', async () => {
              // Arrange
              const sources = [
                {
      Severity: Major
      Found in src/formatter/progress_bar_formatter_spec.ts and 5 other locations - About 5 hrs to fix
      src/formatter/progress_bar_formatter_spec.ts on lines 172..193
      src/formatter/progress_bar_formatter_spec.ts on lines 218..239
      src/formatter/progress_bar_formatter_spec.ts on lines 241..262
      src/formatter/progress_bar_formatter_spec.ts on lines 264..285
      src/formatter/progress_bar_formatter_spec.ts on lines 287..308

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

      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

          describe('ambiguous', () => {
            it('prints the error', async () => {
              // Arrange
              const sources = [
                {
      Severity: Major
      Found in src/formatter/progress_bar_formatter_spec.ts and 5 other locations - About 5 hrs to fix
      src/formatter/progress_bar_formatter_spec.ts on lines 195..216
      src/formatter/progress_bar_formatter_spec.ts on lines 218..239
      src/formatter/progress_bar_formatter_spec.ts on lines 241..262
      src/formatter/progress_bar_formatter_spec.ts on lines 264..285
      src/formatter/progress_bar_formatter_spec.ts on lines 287..308

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

      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

          describe('skipped', () => {
            it('does not print anything', async () => {
              // Arrange
              const sources = [
                {
      Severity: Major
      Found in src/formatter/progress_bar_formatter_spec.ts and 5 other locations - About 5 hrs to fix
      src/formatter/progress_bar_formatter_spec.ts on lines 172..193
      src/formatter/progress_bar_formatter_spec.ts on lines 195..216
      src/formatter/progress_bar_formatter_spec.ts on lines 218..239
      src/formatter/progress_bar_formatter_spec.ts on lines 241..262
      src/formatter/progress_bar_formatter_spec.ts on lines 287..308

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

      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

          describe('undefined', () => {
            it('prints the warning', async () => {
              // Arrange
              const sources = [
                {
      Severity: Major
      Found in src/formatter/progress_bar_formatter_spec.ts and 5 other locations - About 5 hrs to fix
      src/formatter/progress_bar_formatter_spec.ts on lines 172..193
      src/formatter/progress_bar_formatter_spec.ts on lines 195..216
      src/formatter/progress_bar_formatter_spec.ts on lines 218..239
      src/formatter/progress_bar_formatter_spec.ts on lines 241..262
      src/formatter/progress_bar_formatter_spec.ts on lines 264..285

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

      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

          describe('pending', () => {
            it('prints the warning', async () => {
              // Arrange
              const sources = [
                {
      Severity: Major
      Found in src/formatter/progress_bar_formatter_spec.ts and 5 other locations - About 5 hrs to fix
      src/formatter/progress_bar_formatter_spec.ts on lines 172..193
      src/formatter/progress_bar_formatter_spec.ts on lines 195..216
      src/formatter/progress_bar_formatter_spec.ts on lines 218..239
      src/formatter/progress_bar_formatter_spec.ts on lines 264..285
      src/formatter/progress_bar_formatter_spec.ts on lines 287..308

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

      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

          describe('passed', () => {
            it('does not print anything', async () => {
              // Arrange
              const sources = [
                {
      Severity: Major
      Found in src/formatter/progress_bar_formatter_spec.ts and 5 other locations - About 5 hrs to fix
      src/formatter/progress_bar_formatter_spec.ts on lines 172..193
      src/formatter/progress_bar_formatter_spec.ts on lines 195..216
      src/formatter/progress_bar_formatter_spec.ts on lines 241..262
      src/formatter/progress_bar_formatter_spec.ts on lines 264..285
      src/formatter/progress_bar_formatter_spec.ts on lines 287..308

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

      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

        buildTestCaseHookDefinitions(
          configs: ITestCaseHookDefinitionConfig[]
        ): TestCaseHookDefinition[] {
          return configs.map(({ code, line, options, uri }) => {
            const wrappedCode = this.wrapCode({
      Severity: Major
      Found in src/support_code_library_builder/index.ts and 1 other location - About 5 hrs to fix
      src/support_code_library_builder/index.ts on lines 218..235

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

      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

        buildTestRunHookDefinitions(
          configs: ITestRunHookDefinitionConfig[]
        ): TestRunHookDefinition[] {
          return configs.map(({ code, line, options, uri }) => {
            const wrappedCode = this.wrapCode({
      Severity: Major
      Found in src/support_code_library_builder/index.ts and 1 other location - About 5 hrs to fix
      src/support_code_library_builder/index.ts on lines 199..216

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

      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('step name has a quoted string', () => {
            it('adds the proper generated expression', async function() {
              // Arrrange
              const pickleStep = await getPickleStepWithText('Given abc "def" ghi')
      
      
      Severity: Major
      Found in src/formatter/step_definition_snippet_builder/index_spec.ts and 1 other location - About 5 hrs to fix
      src/formatter/step_definition_snippet_builder/index_spec.ts on lines 135..151

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

      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('step name has a standalone number', () => {
            it('adds the proper generated expression', async function() {
              // Arrrange
              const pickleStep = await getPickleStepWithText('Given abc 123 def')
      
      
      Severity: Major
      Found in src/formatter/step_definition_snippet_builder/index_spec.ts and 1 other location - About 5 hrs to fix
      src/formatter/step_definition_snippet_builder/index_spec.ts on lines 95..111

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

      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