rexk/mocha-mix

View on GitHub

Showing 21 of 21 total issues

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

describe('MockGenerator', function () {

  function EmptyMock() {}
  function EmptyMockGenerator() { return EmptyMock; }

Severity: Major
Found in src/__tests__/MockGenerator.test.js and 1 other location - About 1 day to fix
src/__tests__/MixHook.test.js on lines 4..38

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

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('MixHook', function () {

  function EmptyHook() {}
  function EmptyHookGenerator() { return EmptyHook; }

Severity: Major
Found in src/__tests__/MixHook.test.js and 1 other location - About 1 day to fix
src/__tests__/MockGenerator.test.js on lines 4..38

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

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

    it('should clearAllHooks x2', function () {
      var expectedCounts = [0, 0, 0, 0];
      expectedCounts.forEach(function (expected, idx) {
        var spyItem = spyList[idx];
        expect(spyItem.spy.callCount).toBe(expected,
Severity: Major
Found in src/__tests__/MochaMix.test.js and 3 other locations - About 3 hrs to fix
src/__tests__/MochaMix.test.js on lines 30..37
src/__tests__/MochaMix.test.js on lines 39..46
src/__tests__/MochaMix.test.js on lines 73..80

Duplicated Code

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

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

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

Tuning

This issue has a mass of 114.

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

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

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

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

Refactorings

Further Reading

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

    it('should excute hooks', function () {
      var expectedCounts = [1, 1, 0, 0];
      expectedCounts.forEach(function (expected, idx) {
        var spyItem = spyList[idx];
        expect(spyItem.spy.callCount).toBe(expected,
Severity: Major
Found in src/__tests__/MochaMix.test.js and 3 other locations - About 3 hrs to fix
src/__tests__/MochaMix.test.js on lines 39..46
src/__tests__/MochaMix.test.js on lines 73..80
src/__tests__/MochaMix.test.js on lines 82..89

Duplicated Code

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

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

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

Tuning

This issue has a mass of 114.

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

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

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

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

Refactorings

Further Reading

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

      it('should excute hooks x2', function () {
        var expectedCounts = [1, 2, 1, 0];
        expectedCounts.forEach(function (expected, idx) {
          var spyItem = spyList[idx];
          expect(spyItem.spy.callCount).toBe(expected,
Severity: Major
Found in src/__tests__/MochaMix.test.js and 3 other locations - About 3 hrs to fix
src/__tests__/MochaMix.test.js on lines 30..37
src/__tests__/MochaMix.test.js on lines 73..80
src/__tests__/MochaMix.test.js on lines 82..89

Duplicated Code

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

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

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

Tuning

This issue has a mass of 114.

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

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

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

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

Refactorings

Further Reading

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

    it('should clearAllHooks', function () {
      var expectedCounts = [0, 0, 0, 0];
      expectedCounts.forEach(function (expected, idx) {
        var spyItem = spyList[idx];
        expect(spyItem.spy.callCount).toBe(expected,
Severity: Major
Found in src/__tests__/MochaMix.test.js and 3 other locations - About 3 hrs to fix
src/__tests__/MochaMix.test.js on lines 30..37
src/__tests__/MochaMix.test.js on lines 39..46
src/__tests__/MochaMix.test.js on lines 82..89

Duplicated Code

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

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

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

Tuning

This issue has a mass of 114.

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

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

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

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

Refactorings

Further Reading

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

  it('should "require" a module', function () {
    var commonJSModule = mixer.require();
    var expected = ['namedExport1', 'namedExport2', 'default'].sort();
    var actual = Object.keys(commonJSModule).sort();
    expect(actual).toEqual(expected);
Severity: Major
Found in src/__tests__/Mixer.test.js and 1 other location - About 2 hrs to fix
src/__tests__/Mixer.test.js on lines 24..29

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

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 import a module as wildCard', function () {
    var commonJSModule = mixer.require();
    var expected = ['namedExport1', 'namedExport2', 'default'].sort();
    var actual = Object.keys(commonJSModule).sort();
    expect(actual).toEqual(expected);
Severity: Major
Found in src/__tests__/Mixer.test.js and 1 other location - About 2 hrs to fix
src/__tests__/Mixer.test.js on lines 17..22

Duplicated Code

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

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

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

Tuning

This issue has a mass of 82.

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

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

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

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

Refactorings

Further Reading

Function MochaMix has 58 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function MochaMix(options) {
  options = options || {};
  var hooksStore = {
    before: [],
    beforeEach: [],
Severity: Major
Found in src/MochaMix.js - About 2 hrs to fix

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

    function MixHook(hook) {
      if (isMochaMixHook(hook)) {
        return hook;
      }
    
    
    Severity: Major
    Found in src/MixHook.js and 1 other location - About 2 hrs to fix
    src/MockGenerator.js on lines 20..35

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

    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

    function MockGenerator(generator) {
      if (isMochaMixMockGenerator(generator)) {
        return generator;
      }
    
    
    Severity: Major
    Found in src/MockGenerator.js and 1 other location - About 2 hrs to fix
    src/MixHook.js on lines 19..34

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

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

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

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

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

    Refactorings

    Further Reading

    Function Mixer has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function Mixer(recipe) {
      var mixRecipe = MixRecipe(recipe);
      var importPath = getModulePath(mixRecipe.import, mixRecipe.rootDir);
      var mocks = {};
      var mixer = {
    Severity: Minor
    Found in src/Mixer.js - About 1 hr to fix

      Function JestPlugin has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      MochaMix.use(function JestPlugin(mochaMix) {
        var MixHook = mochaMix.MixHook;
        mochaMix.setTestHooksGetter(function () {
          // For Jasmine 2.x runner
          return {
      Severity: Minor
      Found in examples/react-tests/jest-processor.js - About 1 hr to fix

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

              notCalledList.forEach(function (spyItem) {
                expect(spyItem.spy.called).toBe(false, 'expects ' + spyItem.name + ' to be not called');
              });
        Severity: Major
        Found in src/__tests__/plugin.test.js and 3 other locations - About 55 mins to fix
        src/__tests__/plugin.test.js on lines 64..66
        src/__tests__/plugin.test.js on lines 90..92
        src/__tests__/plugin.test.js on lines 94..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 53.

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

              calledList.forEach(function (spyItem) {
                expect(spyItem.spy.calledOnce).toBe(true, 'expects ' + spyItem.name + ' to be called once.');
              });
        Severity: Major
        Found in src/__tests__/plugin.test.js and 3 other locations - About 55 mins to fix
        src/__tests__/plugin.test.js on lines 68..70
        src/__tests__/plugin.test.js on lines 90..92
        src/__tests__/plugin.test.js on lines 94..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 53.

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

              calledList.forEach(function (spyItem) {
                expect(spyItem.spy.calledOnce).toBe(true, 'expects ' + spyItem.name + ' to be called once.');
              });
        Severity: Major
        Found in src/__tests__/plugin.test.js and 3 other locations - About 55 mins to fix
        src/__tests__/plugin.test.js on lines 64..66
        src/__tests__/plugin.test.js on lines 68..70
        src/__tests__/plugin.test.js on lines 94..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 53.

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

              notCalledList.forEach(function (spyItem) {
                expect(spyItem.spy.called).toBe(false, 'expects ' + spyItem.name + ' to be not called');
              });
        Severity: Major
        Found in src/__tests__/plugin.test.js and 3 other locations - About 55 mins to fix
        src/__tests__/plugin.test.js on lines 64..66
        src/__tests__/plugin.test.js on lines 68..70
        src/__tests__/plugin.test.js on lines 90..92

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

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

            spyList.forEach(function (spyItem) {
              var name = spyItem.name;
              var spy = spyItem.spy;
              mochaMix[name](spy);
            });
        Severity: Major
        Found in src/__tests__/MochaMix.test.js and 2 other locations - About 45 mins to fix
        src/__tests__/MochaMix.test.js on lines 20..24
        src/__tests__/MochaMix.test.js on lines 62..66

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 50.

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

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

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

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

        Refactorings

        Further Reading

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

            spyList.forEach(function (spyItem) {
              var name = spyItem.name;
              var spy = spyItem.spy;
              mochaMix[name](spy);
            });
        Severity: Major
        Found in src/__tests__/MochaMix.test.js and 2 other locations - About 45 mins to fix
        src/__tests__/MochaMix.test.js on lines 20..24
        src/__tests__/MochaMix.test.js on lines 115..119

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 50.

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

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

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

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

        Refactorings

        Further Reading

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

            spyList.forEach(function (spyItem) {
              var name = spyItem.name;
              var spy = spyItem.spy;
              mochaMix[name](spy);
            });
        Severity: Major
        Found in src/__tests__/MochaMix.test.js and 2 other locations - About 45 mins to fix
        src/__tests__/MochaMix.test.js on lines 62..66
        src/__tests__/MochaMix.test.js on lines 115..119

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 50.

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

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

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

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

        Refactorings

        Further Reading

        Severity
        Category
        Status
        Source
        Language