Showing 29 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");
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");
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");
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);
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;
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");
File SetupLinksAndPushStateSpec.js
has 339 lines of code (exceeds 250 allowed). Consider refactoring. Open
"use strict";
describe("SetupLinksAndPushState", function() {
var SetupLinksAndPushState = require("../../../lib/client/SetupLinksAndPushState");
var Browser = require("../../../lib/client/Browser");
Function initialize
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
initialize() {
var Layout = Brisket.Layout.extend({
template: "<!DOCTYPE html>\n<html><head><title>New App</title></head><body></body></html>",
content: "body"
});
Function execute
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
execute: function(router, originalHandler, params, windough) {
windough = windough || window;
currentRequestId = currentRequestId + 1;
var clientRequest = ClientRequest.from(windough, currentRequestId, environmentConfig);
- Read upRead up
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
File ServerAjaxSpec.js
has 290 lines of code (exceeds 250 allowed). Consider refactoring. Open
"use strict";
describe("ServerAjax", function() {
var ServerAjax = require("../../lib/server/ServerAjax");
var AjaxCallsForCurrentRequest = require("../../lib/server/AjaxCallsForCurrentRequest");
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");
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");
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 || {};
Function setup
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
setup: function(apis) {
var availableApis = specificityOrderedApis(apis);
Backbone.ajax = function(options) {
var originalUrl = options.url;
Function ajax
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Backbone.ajax = function(options) {
var originalUrl = options.url;
var queryParams = options.data;
var method = options.type ? options.type.toUpperCase() : "GET";
Function setup
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
setup: function(bootstrappedData, appRoot) {
ClientTestable.BackboneNativeAjax.Promise = Promise;
BootstrappedDataService.load(bootstrappedData);
- Read upRead up
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 from
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
from: function(windough, requestId, environmentConfig) {
environmentConfig = environmentConfig || {};
var protocol = windough.location.protocol;
var querystring = windough.location.search.substr(1);
Function setup
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
setup: function(bootstrappedData, appRoot) {
ClientTestable.BackboneNativeAjax.Promise = Promise;
BootstrappedDataService.load(bootstrappedData);
Function ajax
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Backbone.ajax = function(ajaxConfig) {
var dataInBootstrappedData = BootstrappedDataService.getFor(ajaxConfig);
var bubbledError;
function bubbleErrorFrom(prop) {
Function setup
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
setup: function(apis) {
var availableApis = specificityOrderedApis(apis);
Backbone.ajax = function(options) {
var originalUrl = options.url;
- Read upRead up
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"