brisket/brisket

View on GitHub

Showing 269 of 269 total issues

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

    describe("when server renderer start script is NOT available already", function() {

        beforeEach(function() {
            whenAppStartsAsync();
        });
Severity: Major
Found in spec/client/application/AppStartsClientSpec.js and 1 other location - About 2 hrs to fix
spec/client/application/AppStartsClientSpec.js on lines 32..46

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

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 ClientRendererSpec.js has 289 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"use strict";

describe("ClientRenderer", function() {
    var ClientRenderer = require("../../../lib/client/ClientRenderer");
    var HasPageLevelData = require("../../../lib/traits/HasPageLevelData");
Severity: Minor
Found in spec/client/client/ClientRendererSpec.js - About 2 hrs to fix

    File ServerSpec.js has 284 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    "use strict";
    
    describe("Server", function() {
        var Server = require("../../lib/server/Server");
        var ServerResponseWorkflow = require("../../lib/server/ServerResponseWorkflow");
    Severity: Minor
    Found in spec/server/ServerSpec.js - About 2 hrs to fix

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

                  it("renders child views placed directly in template", function() {
                      expect(view.$(childView1.el)).toExist();
                      expect(view.$(childView2.el)).toExist();
                      expect(view.$(childView3.el)).toExist();
                  });
      Severity: Major
      Found in spec/client/viewing/RenderableViewSpec.js and 1 other location - About 2 hrs to fix
      spec/client/viewing/RenderableViewSpec.js on lines 188..192

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

                  it("renders any unrendered child views", function() {
                      expect(view.$(childView1.el)).toExist();
                      expect(view.$(childView2.el)).toExist();
                      expect(view.$(childView3.el)).toExist();
                  });
      Severity: Major
      Found in spec/client/viewing/RenderableViewSpec.js and 1 other location - About 2 hrs to fix
      spec/client/viewing/RenderableViewSpec.js on lines 150..154

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

              describe("when protocol is http", function() {
      
                  beforeEach(function() {
                      mockServerRequest = validMockServerRequest({
                          protocol: "http"
      Severity: Major
      Found in spec/server/ServerRendererSpec.js and 3 other locations - About 2 hrs to fix
      spec/server/ServerRendererSpec.js on lines 67..80
      spec/server/ServerRendererSpec.js on lines 90..103
      spec/server/ServerRendererSpec.js on lines 105..118

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 88.

      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

              describe("when protocol is http", function() {
      
                  beforeEach(function() {
                      mockServerRequest = validMockServerRequest({
                          protocol: "http"
      Severity: Major
      Found in spec/server/ServerRendererSpec.js and 3 other locations - About 2 hrs to fix
      spec/server/ServerRendererSpec.js on lines 52..65
      spec/server/ServerRendererSpec.js on lines 67..80
      spec/server/ServerRendererSpec.js on lines 105..118

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 88.

      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

              describe("when protocol is https", function() {
      
                  beforeEach(function() {
                      mockServerRequest = validMockServerRequest({
                          protocol: "https"
      Severity: Major
      Found in spec/server/ServerRendererSpec.js and 3 other locations - About 2 hrs to fix
      spec/server/ServerRendererSpec.js on lines 52..65
      spec/server/ServerRendererSpec.js on lines 67..80
      spec/server/ServerRendererSpec.js on lines 90..103

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

      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

              describe("when protocol is https", function() {
      
                  beforeEach(function() {
                      mockServerRequest = validMockServerRequest({
                          protocol: "https"
      Severity: Major
      Found in spec/server/ServerRendererSpec.js and 3 other locations - About 2 hrs to fix
      spec/server/ServerRendererSpec.js on lines 52..65
      spec/server/ServerRendererSpec.js on lines 90..103
      spec/server/ServerRendererSpec.js on lines 105..118

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 88.

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

                  it("does NOT render the first request", function(done) {
                      bothReturn
                          .then(function() {
                              expect(ClientRenderer.render).not.toHaveBeenCalledWith(
                                  jasmine.any(Layout),
      Severity: Major
      Found in spec/client/client/ClientRenderingWorkflowSpec.js and 1 other location - About 2 hrs to fix
      spec/client/client/ClientRenderingWorkflowSpec.js on lines 870..881

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

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

                  it("does NOT render the first request", function(done) {
                      bothReturn
                          .then(function() {
                              expect(ClientRenderer.render).not.toHaveBeenCalledWith(
                                  jasmine.any(Layout),
      Severity: Major
      Found in spec/client/client/ClientRenderingWorkflowSpec.js and 1 other location - About 2 hrs to fix
      spec/client/client/ClientRenderingWorkflowSpec.js on lines 1000..1011

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

      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 create has 63 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          create: function(requestedConfig) {
              var brisketEngine = express();
      
              var config = requestedConfig || {};
              var apis = config.apis || {};
      Severity: Major
      Found in lib/server/Server.js - About 2 hrs to fix

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

                    it("renders the latest request", function(done) {
                        bothReturn
                            .then(function() {
                                expect(ClientRenderer.render).toHaveBeenCalledWith(
                                    jasmine.any(Layout),
        Severity: Major
        Found in spec/client/client/ClientRenderingWorkflowSpec.js and 1 other location - About 2 hrs to fix
        spec/client/client/ClientRenderingWorkflowSpec.js on lines 1013..1024

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

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

                    it("renders the latest request", function(done) {
                        bothReturn
                            .then(function() {
                                expect(ClientRenderer.render).toHaveBeenCalledWith(
                                    jasmine.any(Layout),
        Severity: Major
        Found in spec/client/client/ClientRenderingWorkflowSpec.js and 1 other location - About 2 hrs to fix
        spec/client/client/ClientRenderingWorkflowSpec.js on lines 1062..1074

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

        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("prepends a descendant element with a child view", function() {
                        $descendantElement().append("<div class='some_element' />");
                        parentView.createChildView(childView).andPrependItTo(".descendant");
                        expect($descendantElement().children().first()).$toBe(childView.$el);
                    });
        Severity: Major
        Found in spec/client/viewing/ViewRelationshipSpec.js and 1 other location - About 2 hrs to fix
        spec/client/viewing/ViewRelationshipSpec.js on lines 215..219

        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("appends a child view to a descendant element", function() {
                        $descendantElement().append("<div class='some_element' />");
                        parentView.createChildView(childView).andAppendItTo(".descendant");
                        expect($descendantElement().children().last()).$toBe(childView.$el);
                    });
        Severity: Major
        Found in spec/client/viewing/ViewRelationshipSpec.js and 1 other location - About 2 hrs to fix
        spec/client/viewing/ViewRelationshipSpec.js on lines 221..225

        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

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

            describe("when router doesn't have errorViewMapping and there is an error", function() {
        
                beforeEach(function() {
                    fakeRouter.errorViewMapping = null;
        
        
        Severity: Major
        Found in spec/client/client/ClientRenderingWorkflowSpec.js and 1 other location - About 2 hrs to fix
        spec/server/ServerRenderingWorkflowSpec.js on lines 605..619

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

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

            describe("when router doesn't have errorViewMapping and there is an error", function() {
        
                beforeEach(function() {
                    fakeRouter.errorViewMapping = null;
        
        
        Severity: Major
        Found in spec/server/ServerRenderingWorkflowSpec.js and 1 other location - About 2 hrs to fix
        spec/client/client/ClientRenderingWorkflowSpec.js on lines 1212..1226

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

        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

            function itDoesNotCleanUpLayout() {
                it("does NOT clean up layout", function(done) {
                    handlerReturns
                        .then(function() {
                            expect(Layout.prototype.close).not.toHaveBeenCalled();
        Severity: Major
        Found in spec/client/client/ClientRenderingWorkflowSpec.js and 2 other locations - About 2 hrs to fix
        spec/client/client/ClientRenderingWorkflowSpec.js on lines 1298..1307
        spec/client/client/ClientRenderingWorkflowSpec.js on lines 1309..1318

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

        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

            function secondRouteDoesNotCleanUpLayout() {
                it("does NOT clean up layout for second route", function(done) {
                    secondReturns
                        .then(function() {
                            expect(Layout.prototype.close).not.toHaveBeenCalled();
        Severity: Major
        Found in spec/client/client/ClientRenderingWorkflowSpec.js and 2 other locations - About 2 hrs to fix
        spec/client/client/ClientRenderingWorkflowSpec.js on lines 1287..1296
        spec/client/client/ClientRenderingWorkflowSpec.js on lines 1298..1307

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

        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