brisket/brisket

View on GitHub

Showing 269 of 269 total issues

File ClientRenderingWorkflowSpec.js has 1104 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"use strict";

describe("ClientRenderingWorkflow", function() {
    var ClientRenderingWorkflow = require("../../../lib/client/ClientRenderingWorkflow");
    var ClientRenderer = require("../../../lib/client/ClientRenderer");
Severity: Major
Found in spec/client/client/ClientRenderingWorkflowSpec.js - About 2 days to fix

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

        describe("when original handler returns with a 404", function() {
    
            beforeEach(function() {
                error = {
                    status: 404
    Severity: Major
    Found in spec/server/ServerRenderingWorkflowSpec.js and 2 other locations - About 1 day to fix
    spec/server/ServerRenderingWorkflowSpec.js on lines 367..405
    spec/server/ServerRenderingWorkflowSpec.js on lines 407..445

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

    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

        describe("when original handler returns error (not 500 or 404)", function() {
    
            beforeEach(function() {
                error = {
                    status: 503
    Severity: Major
    Found in spec/server/ServerRenderingWorkflowSpec.js and 2 other locations - About 1 day to fix
    spec/server/ServerRenderingWorkflowSpec.js on lines 327..365
    spec/server/ServerRenderingWorkflowSpec.js on lines 367..405

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

    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

        describe("when original handler returns with a 500", function() {
    
            beforeEach(function() {
                error = {
                    status: 500
    Severity: Major
    Found in spec/server/ServerRenderingWorkflowSpec.js and 2 other locations - About 1 day to fix
    spec/server/ServerRenderingWorkflowSpec.js on lines 327..365
    spec/server/ServerRenderingWorkflowSpec.js on lines 407..445

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

    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

        describe("when original handler returns error (not 500 or 404)", function() {
    
            beforeEach(function() {
                error = {
                    status: 503
    Severity: Major
    Found in spec/client/client/ClientRenderingWorkflowSpec.js and 2 other locations - About 1 day to fix
    spec/client/client/ClientRenderingWorkflowSpec.js on lines 452..490
    spec/client/client/ClientRenderingWorkflowSpec.js on lines 492..530

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

    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

        describe("when original handler returns with a 500", function() {
    
            beforeEach(function() {
                error = {
                    status: 500
    Severity: Major
    Found in spec/client/client/ClientRenderingWorkflowSpec.js and 2 other locations - About 1 day to fix
    spec/client/client/ClientRenderingWorkflowSpec.js on lines 452..490
    spec/client/client/ClientRenderingWorkflowSpec.js on lines 532..570

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

    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

        describe("when original handler returns with a 404", function() {
    
            beforeEach(function() {
                error = {
                    status: 404
    Severity: Major
    Found in spec/client/client/ClientRenderingWorkflowSpec.js and 2 other locations - About 1 day to fix
    spec/client/client/ClientRenderingWorkflowSpec.js on lines 492..530
    spec/client/client/ClientRenderingWorkflowSpec.js on lines 532..570

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

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

    "use strict";
    
    describe("ServerRenderingWorkflow", function() {
        var Backbone = require("../../lib/application/Backbone");
        var Promise = require("bluebird");
    Severity: Major
    Found in spec/server/ServerRenderingWorkflowSpec.js - About 1 day to fix

      File RenderableViewSpec.js has 562 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      "use strict";
      
      describe("RenderableView", function() {
          var RenderableView = require("../../../lib/viewing/RenderableView");
          var Backbone = require("../../../lib/application/Backbone");
      Severity: Major
      Found in spec/client/viewing/RenderableViewSpec.js - About 1 day to fix

        Function execute has 157 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            execute: function(router, originalHandler, params, windough) {
                windough = windough || window;
                currentRequestId = currentRequestId + 1;
        
                var clientRequest = ClientRequest.from(windough, currentRequestId, environmentConfig);
        Severity: Major
        Found in lib/client/ClientRenderingWorkflow.js - About 6 hrs to fix

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

              describe("link tags", function() {
          
                  itRequiresPairs(Metatags.LinkTags);
          
                  describe("when pairs are provided", function() {
          Severity: Major
          Found in spec/client/metatags/MetatagsSpec.js and 1 other location - About 5 hrs to fix
          spec/client/metatags/MetatagsSpec.js on lines 43..69

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

          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("opengraph metatags", function() {
          
                  itRequiresPairs(Metatags.OpenGraphTags);
          
                  describe("when pairs are provided", function() {
          Severity: Major
          Found in spec/client/metatags/MetatagsSpec.js and 1 other location - About 5 hrs to fix
          spec/client/metatags/MetatagsSpec.js on lines 71..97

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

          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("runs initializers and client initializers in the order they were added", function() {
                      var order = [];
          
                      function identifyAs(number) {
                          return function() {
          Severity: Major
          Found in spec/client/application/AppSpec.js and 1 other location - About 5 hrs to fix
          spec/client/application/AppSpec.js on lines 49..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 140.

          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("runs initializers and server initializers in the order they were added", function() {
                      var order = [];
          
                      function identifyAs(number) {
                          return function() {
          Severity: Major
          Found in spec/client/application/AppSpec.js and 1 other location - About 5 hrs to fix
          spec/client/application/AppSpec.js on lines 100..117

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

          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("#replacePath", function() {
          
                      it("replaces route with requested route", function() {
                          SetupLinksAndPushState.replacePath("newRoute");
          
          
          Severity: Major
          Found in spec/client/client/SetupLinksAndPushStateSpec.js and 1 other location - About 5 hrs to fix
          spec/client/client/SetupLinksAndPushStateSpec.js on lines 405..423

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

          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("#navigateTo", function() {
          
                      it("triggers route for requested route", function() {
                          SetupLinksAndPushState.navigateTo("newRoute");
          
          
          Severity: Major
          Found in spec/client/client/SetupLinksAndPushStateSpec.js and 1 other location - About 5 hrs to fix
          spec/client/client/SetupLinksAndPushStateSpec.js on lines 236..254

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

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

              execute: function(router, originalHandler, params, expressRequest, environmentConfig) {
                  var serverRequest = ServerRequest.from(expressRequest, environmentConfig);
                  var serverResponse = ServerResponse.create();
          
                  var LayoutForRoute = router.layout;
          Severity: Major
          Found in lib/server/ServerRenderingWorkflow.js - About 4 hrs to fix

            File ServerRendererSpec.js has 346 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            "use strict";
            
            describe("ServerRenderer", function() {
                var Backbone = require("../../lib/application/Backbone");
                var ServerRenderer = require("../../lib/server/ServerRenderer");
            Severity: Minor
            Found in spec/server/ServerRendererSpec.js - About 4 hrs to fix

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

                      it("bubbles error from success callback", function(done) {
                          givenAjaxCallWillSucceed();
              
                          error = new Error();
              
              
              Severity: Major
              Found in spec/client/client/ClientAjaxSpec.js and 1 other location - About 4 hrs to fix
              spec/client/client/ClientAjaxSpec.js on lines 128..146

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

              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("bubbles error from error callback", function(done) {
                          givenAjaxCallWillFail();
              
                          error = new Error();
              
              
              Severity: Major
              Found in spec/client/client/ClientAjaxSpec.js and 1 other location - About 4 hrs to fix
              spec/client/client/ClientAjaxSpec.js on lines 108..126

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

              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