Showing 270 of 270 total issues
Function load
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
load: function(staticPath, assetsPath, sessionStore, sessionOptions) {
if (!app) {
// if ss.http.middleware isn't used before server start, no need to load it
return;
}
Function exports
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(ss, router, options) {
function serve(processor) {
return function(request, response) {
var path = utils.parseUrl(request.url);
Function parse
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parse(str) {
str = String(str);
if (str.length > 100) {
return;
}
Function exports
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(ss,client,options){
var bundler = ss.bundler.create({
define: define,
asset: asset
Function exports
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(ss,client,options){
var bundler = ss.bundler.create({
define: define,
asset: asset
Function exports
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (ss, router/*, options*/) {
ss.bundler.forEach(function(bundler) {
router.on(bundler.dests.urls.css + '?*', serveCSS);
Function connect
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
connect: function(){
var sock = new eio.Socket(config);
sock.on('message', function(e) {
var i, x, msg = e;
Function reindentCode
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
service.reindentCode = function() {
return function (text, spaces) {
if (!text) return text;
var lines = text.split(/\r?\n/);
var prefix = ' '.substr(0, spaces || 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 exports
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(ss, router, options, orchestrator) {
return function(plan) {
plan = plan || {};
- 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 encodePayloadAsArrayBuffer
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.encodePayloadAsArrayBuffer = function(packets, callback) {
if (!packets.length) {
return callback(new ArrayBuffer(0));
}
Function websocket
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
websocket: function(msg, meta, send) {
var handleError, msgLogName, req;
// RPC responder uses JSON both ways
msg = JSON.parse(msg);
Function jsFiddle
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
directive.jsFiddle = function(getEmbeddedTemplate, escape, script) {
return {
terminal: true,
link: function(scope, element, attr) {
var name = '',
Function decodeSymbol
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function decodeSymbol(strict) {
var byte1;
var byte2;
var byte3;
var byte4;
Function createDebug
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createDebug(namespace) {
var prevTime;
function debug() {
Function exports
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(ss, clients, options) {
// Append the 'serveClient' method to the HTTP Response object
res.serveClient = function(name) {
var self = this;
- 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 14 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(ss,options) {
var mods = [];
return {
/**
* @ngdoc method
- 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 UniqueSet
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.UniqueSet = (function() {
function UniqueSet() {
this.data = {};
}
Consider simplifying this complex logical expression. Open
if ((typeof Buffer === 'function' && Buffer.isBuffer && Buffer.isBuffer(obj)) ||
(typeof ArrayBuffer === 'function' && obj instanceof ArrayBuffer) ||
(withNativeBlob && obj instanceof Blob) ||
(withNativeFile && obj instanceof File)
) {
Function syntax
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
directive.syntax = function() {
return {
restrict: 'A',
link: function(scope, element, attrs) {
function makeLink(type, text, link, icon) {
Function link
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function(scope, element, attr) {
var name = '',
stylesheet = '<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">\n',
fields = {
html: '',