Showing 206 of 270 total issues
Function exports
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(ss,options) {
var mods = [];
// Set the Default Engine - simply wraps each template in a <script> tag
var defaultEngine = require('./template_engines/default')(ss.root,null,options);
Function generate
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
exports.generate = function(program) {
var appjs,
codeExtension = program.coffee && 'coffee' || 'js',
selectedFormatters = [],
- 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 exports
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(root) {
return {
/* Return API */
get middleware() {
if (!app) {
- 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 exports
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(ss, router, options, orchestrator) {
return function(plan) {
plan = plan || {};
Function exports
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(ss) {
// make bundler methods available for default and other implementations
ss.bundler = require('./bundler/index')(ss,options);
// extend http response API
- 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 output
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
InlineLexer.prototype.output = function(src) {
var out = ''
, link
, text
, href
File eventemitter2.js
has 339 lines of code (exceeds 250 allowed). Consider refactoring. Open
;!function(exports, undefined) {
var isArray = Array.isArray ? Array.isArray : function _isArray(obj) {
return Object.prototype.toString.call(obj) === "[object Array]";
};
File angular-bootstrap.js
has 338 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
var directive = {};
directive.dropdownToggle =
Function updateSearch
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
function updateSearch() {
var cache = {},
pages = sections[$location.path().split('/')[1]],
modules = $scope.modules = [],
otherPages = $scope.pages = [],
Function serveStatic
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
exports = module.exports = function serveStatic (prefix,root, options) {
if (!root) {
throw new TypeError('root path required')
}
- 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 exports
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(root) {
return {
/* Return API */
get middleware() {
if (!app) {
Function createSimpleLexer
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
var shortcuts = {};
var tokenizer;
(function () {
var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
Function numberLines
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
function numberLines(node, opt_startLineNum, isPreformatted) {
var nocode = /(?:^|\s)nocode(?:\s|$)/;
var lineBreak = /\r\n?|\n/;
var document = node.ownerDocument;
Function prettyPrint
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
function prettyPrint(opt_whenDone) {
function byTagName(tn) { return document.getElementsByTagName(tn); }
// fetch a list of nodes to rewrite
var codeSegments = [byTagName('pre'), byTagName('code'), byTagName('xmp')];
var elements = [];
Function popoverElement
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
var popoverElement = function() {
var object = {
init : function() {
this.element = angular.element(
'<div class="popover popover-incode top">' +
Function exports
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(ss, router, options) {
return {
plan: function(args) {
var plan = {}, httpServer = args[0];
- 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 probe
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Socket.prototype.probe = function (name) {
debug('probing transport "%s"', name);
var transport = this.createTransport(name, { probe: 1 });
var failed = false;
var self = this;
Function recombineTagsAndDecorations
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
function recombineTagsAndDecorations(job) {
var isIE8OrEarlier = /\bMSIE\s(\d+)/.exec(navigator.userAgent);
isIE8OrEarlier = isIE8OrEarlier && +isIE8OrEarlier[1] <= 8;
var newlineRe = /\n/g;
Function sourceDecorator
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
function sourceDecorator(options) {
var shortcutStylePatterns = [], fallthroughStylePatterns = [];
if (options['tripleQuotedStrings']) {
// '''multi-line-string''', 'single-line-string', and double-quoted
shortcutStylePatterns.push(
Function tabbable
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
directive.tabbable = function() {
return {
restrict: 'C',
compile: function(element) {
var navTabs = angular.element('<ul class="nav nav-tabs"></ul>'),