cucumber/cucumber-js

View on GitHub

Showing 205 issues of 232 total

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

      it('emits a source event', function() {
        expect(this.onSource).to.have.been.calledOnce
        expect(this.onSource).to.have.been.calledWith({
          data: 'Feature: a\nScenario: b\nGiven a step',
          media: { encoding: 'utf-8', type: 'text/x.cucumber.gherkin+plain' },
Severity: Major
Found in src/cli/helpers_spec.js and 2 other locations - About 3 hrs to fix
src/cli/helpers_spec.js on lines 43..50
src/cli/helpers_spec.js on lines 89..96

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

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

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

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

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

Refactorings

Further Reading

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

      it('emits a source event', function() {
        expect(this.onSource).to.have.been.calledOnce
        expect(this.onSource).to.have.been.calledWith({
          data: 'Feature: a\nScenario: b\nGiven a step',
          media: { encoding: 'utf-8', type: 'text/x.cucumber.gherkin+plain' },
Severity: Major
Found in src/cli/helpers_spec.js and 2 other locations - About 3 hrs to fix
src/cli/helpers_spec.js on lines 43..50
src/cli/helpers_spec.js on lines 129..136

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

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

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

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

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

Refactorings

Further Reading

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

      it('emits a source event', function() {
        expect(this.onSource).to.have.been.calledOnce
        expect(this.onSource).to.have.been.calledWith({
          data: '',
          media: { encoding: 'utf-8', type: 'text/x.cucumber.gherkin+plain' },
Severity: Major
Found in src/cli/helpers_spec.js and 2 other locations - About 3 hrs to fix
src/cli/helpers_spec.js on lines 89..96
src/cli/helpers_spec.js on lines 129..136

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

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('keyword is And, previous keyword type is event', function() {
      beforeEach(function() {
        this.keywordType = getStepKeywordType({
          keyword: 'And ',
          language: 'en',
Severity: Major
Found in src/formatter/helpers/keyword_type_spec.js and 1 other location - About 3 hrs to fix
src/formatter/helpers/keyword_type_spec.js on lines 90..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 100.

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('keyword is But, previous keyword type is outcome', function() {
      beforeEach(function() {
        this.keywordType = getStepKeywordType({
          keyword: 'But ',
          language: 'en',
Severity: Major
Found in src/formatter/helpers/keyword_type_spec.js and 1 other location - About 3 hrs to fix
src/formatter/helpers/keyword_type_spec.js on lines 63..75

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

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

Identical blocks of code found in 5 locations. Consider refactoring.
Open

      it('emits test-step-started', function() {
        expect(this.onTestStepStarted).to.have.been.calledOnce
        expect(this.onTestStepStarted).to.have.been.calledWith({
          index: 0,
          testCase: { sourceLocation: { line: 1, uri: 'path/to/feature' } }
Severity: Major
Found in src/runtime/test_case_runner_spec.js and 4 other locations - About 3 hrs to fix
src/runtime/test_case_runner_spec.js on lines 122..128
src/runtime/test_case_runner_spec.js on lines 194..200
src/runtime/test_case_runner_spec.js on lines 343..349
src/runtime/test_case_runner_spec.js on lines 408..414

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

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

Identical blocks of code found in 5 locations. Consider refactoring.
Open

      it('emits test-step-started', function() {
        expect(this.onTestStepStarted).to.have.been.calledOnce
        expect(this.onTestStepStarted).to.have.been.calledWith({
          index: 0,
          testCase: { sourceLocation: { line: 1, uri: 'path/to/feature' } }
Severity: Major
Found in src/runtime/test_case_runner_spec.js and 4 other locations - About 3 hrs to fix
src/runtime/test_case_runner_spec.js on lines 122..128
src/runtime/test_case_runner_spec.js on lines 276..282
src/runtime/test_case_runner_spec.js on lines 343..349
src/runtime/test_case_runner_spec.js on lines 408..414

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

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

Identical blocks of code found in 5 locations. Consider refactoring.
Open

      it('emits test-step-started', function() {
        expect(this.onTestStepStarted).to.have.been.calledOnce
        expect(this.onTestStepStarted).to.have.been.calledWith({
          index: 0,
          testCase: { sourceLocation: { line: 1, uri: 'path/to/feature' } }
Severity: Major
Found in src/runtime/test_case_runner_spec.js and 4 other locations - About 3 hrs to fix
src/runtime/test_case_runner_spec.js on lines 194..200
src/runtime/test_case_runner_spec.js on lines 276..282
src/runtime/test_case_runner_spec.js on lines 343..349
src/runtime/test_case_runner_spec.js on lines 408..414

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

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

Identical blocks of code found in 5 locations. Consider refactoring.
Open

      it('emits test-step-started', function() {
        expect(this.onTestStepStarted).to.have.been.calledOnce
        expect(this.onTestStepStarted).to.have.been.calledWith({
          index: 0,
          testCase: { sourceLocation: { line: 1, uri: 'path/to/feature' } }
Severity: Major
Found in src/runtime/test_case_runner_spec.js and 4 other locations - About 3 hrs to fix
src/runtime/test_case_runner_spec.js on lines 122..128
src/runtime/test_case_runner_spec.js on lines 194..200
src/runtime/test_case_runner_spec.js on lines 276..282
src/runtime/test_case_runner_spec.js on lines 408..414

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

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

Identical blocks of code found in 5 locations. Consider refactoring.
Open

      it('emits test-step-started', function() {
        expect(this.onTestStepStarted).to.have.been.calledOnce
        expect(this.onTestStepStarted).to.have.been.calledWith({
          index: 0,
          testCase: { sourceLocation: { line: 1, uri: 'path/to/feature' } }
Severity: Major
Found in src/runtime/test_case_runner_spec.js and 4 other locations - About 3 hrs to fix
src/runtime/test_case_runner_spec.js on lines 122..128
src/runtime/test_case_runner_spec.js on lines 194..200
src/runtime/test_case_runner_spec.js on lines 276..282
src/runtime/test_case_runner_spec.js on lines 343..349

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

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 120.3 seconds', function() {
        beforeEach(function() {
          this.eventBroadcaster.emit('test-run-finished', {
            result: { duration: 123 * 1000 }
          })
Severity: Major
Found in src/formatter/summary_formatter_spec.js and 1 other location - About 2 hrs to fix
src/formatter/summary_formatter_spec.js on lines 226..236

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

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', function() {
        beforeEach(function() {
          this.eventBroadcaster.emit('test-run-finished', {
            result: { duration: 123 * 100 }
          })
Severity: Major
Found in src/formatter/summary_formatter_spec.js and 1 other location - About 2 hrs to fix
src/formatter/summary_formatter_spec.js on lines 238..248

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

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('scenario name matches A', function() {
          beforeEach(function() {
            this.input.pickle.name = 'nameA descriptionA'
          })

Severity: Major
Found in src/pickle_filter_spec.js and 4 other locations - About 2 hrs to fix
src/pickle_filter_spec.js on lines 122..130
src/pickle_filter_spec.js on lines 142..150
src/pickle_filter_spec.js on lines 152..160
src/pickle_filter_spec.js on lines 162..170

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

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('scenario name does not match A', function() {
          beforeEach(function() {
            this.input.pickle.name = 'nameB descriptionB'
          })

Severity: Major
Found in src/pickle_filter_spec.js and 4 other locations - About 2 hrs to fix
src/pickle_filter_spec.js on lines 112..120
src/pickle_filter_spec.js on lines 142..150
src/pickle_filter_spec.js on lines 152..160
src/pickle_filter_spec.js on lines 162..170

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

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('scenario name matches B', function() {
          beforeEach(function() {
            this.input.pickle.name = 'nameB descriptionB'
          })

Severity: Major
Found in src/pickle_filter_spec.js and 4 other locations - About 2 hrs to fix
src/pickle_filter_spec.js on lines 112..120
src/pickle_filter_spec.js on lines 122..130
src/pickle_filter_spec.js on lines 142..150
src/pickle_filter_spec.js on lines 162..170

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

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('scenario name matches A', function() {
          beforeEach(function() {
            this.input.pickle.name = 'nameA descriptionA'
          })

Severity: Major
Found in src/pickle_filter_spec.js and 4 other locations - About 2 hrs to fix
src/pickle_filter_spec.js on lines 112..120
src/pickle_filter_spec.js on lines 122..130
src/pickle_filter_spec.js on lines 152..160
src/pickle_filter_spec.js on lines 162..170

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

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('scenario name does not match A or B', function() {
          beforeEach(function() {
            this.input.pickle.name = 'nameC descriptionC'
          })

Severity: Major
Found in src/pickle_filter_spec.js and 4 other locations - About 2 hrs to fix
src/pickle_filter_spec.js on lines 112..120
src/pickle_filter_spec.js on lines 122..130
src/pickle_filter_spec.js on lines 142..150
src/pickle_filter_spec.js on lines 152..160

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

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('keyword is But, no previous step', function() {
      beforeEach(function() {
        this.keywordType = getStepKeywordType({
          keyword: 'But ',
          language: 'en'
Severity: Major
Found in src/formatter/helpers/keyword_type_spec.js and 4 other locations - About 2 hrs to fix
src/formatter/helpers/keyword_type_spec.js on lines 11..22
src/formatter/helpers/keyword_type_spec.js on lines 24..35
src/formatter/helpers/keyword_type_spec.js on lines 37..48
src/formatter/helpers/keyword_type_spec.js on lines 50..61

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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('keyword is And, no previous step', function() {
      beforeEach(function() {
        this.keywordType = getStepKeywordType({
          keyword: 'And ',
          language: 'en'
Severity: Major
Found in src/formatter/helpers/keyword_type_spec.js and 4 other locations - About 2 hrs to fix
src/formatter/helpers/keyword_type_spec.js on lines 11..22
src/formatter/helpers/keyword_type_spec.js on lines 24..35
src/formatter/helpers/keyword_type_spec.js on lines 37..48
src/formatter/helpers/keyword_type_spec.js on lines 77..88

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

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('keyword is Given', function() {
      beforeEach(function() {
        this.keywordType = getStepKeywordType({
          keyword: 'Given ',
          language: 'en'
Severity: Major
Found in src/formatter/helpers/keyword_type_spec.js and 4 other locations - About 2 hrs to fix
src/formatter/helpers/keyword_type_spec.js on lines 24..35
src/formatter/helpers/keyword_type_spec.js on lines 37..48
src/formatter/helpers/keyword_type_spec.js on lines 50..61
src/formatter/helpers/keyword_type_spec.js on lines 77..88

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

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