brisket/brisket

View on GitHub

Showing 29 of 269 total issues

Function toApi has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    toApi: function(apiConfig, apiAlias) {
        return function(req, res) {
            var options = {
                url: apiConfig.host + req.url,
                timeout: apiConfig.timeout || null
Severity: Minor
Found in lib/server/ForwardClientRequest.js - About 1 hr to fix

    Function render has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            render: function() {
                var isReanimatingFromServer = this.isAttached && !this.hasBeenRendered;
    
                if (this.hasBeenRendered) {
                    this.closeChildViews();
    Severity: Minor
    Found in lib/viewing/RenderableView.js - About 1 hr to fix

      Function from has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

          from: function(windough, requestId, environmentConfig) {
              environmentConfig = environmentConfig || {};
      
              var protocol = windough.location.protocol;
              var querystring = windough.location.search.substr(1);
      Severity: Minor
      Found in lib/client/ClientRequest.js - About 55 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function logAndRenderError has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function logAndRenderError(reason, layout, errorViewMapping, clientRequest, requestId) {
      Severity: Minor
      Found in lib/client/ClientRenderingWorkflow.js - About 35 mins to fix

        Function execute has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            execute: function(router, originalHandler, params, expressRequest, environmentConfig) {
        Severity: Minor
        Found in lib/server/ServerRenderingWorkflow.js - About 35 mins to fix

          Function addRouteToBackboneHistory has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          function addRouteToBackboneHistory(router, route, rawRoute, name, callback) {
          Severity: Minor
          Found in lib/controlling/Router.js - About 35 mins to fix

            Function render has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                    render: function() {
                        var isReanimatingFromServer = this.isAttached && !this.hasBeenRendered;
            
                        if (this.hasBeenRendered) {
                            this.closeChildViews();
            Severity: Minor
            Found in lib/viewing/RenderableView.js - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function execute has a Cognitive Complexity of 6 (exceeds 5 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: Minor
            Found in lib/server/ServerRenderingWorkflow.js - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function isExternalLinkTarget has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            function isExternalLinkTarget(target) {
                return target === "_blank" ||
                    (target === "_parent" && window.parent !== window.self) ||
                    (target === "_top" && window.top !== window.self) ||
                    (typeof target === "string" && target !== "_self");
            Severity: Minor
            Found in lib/controlling/isExternalLinkTarget.js - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Severity
            Category
            Status
            Source
            Language