Showing 32 of 66 total issues
Function commands
has a Cognitive Complexity of 196 (exceeds 5 allowed). Consider refactoring. Open
exports.commands = function () {
var keys = Object.keys
, minimatch = require( 'minimatch' )
, wmsg = function ( cmd ) {
- 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 Vapid
has a Cognitive Complexity of 136 (exceeds 5 allowed). Consider refactoring. Open
exports.Vapid = ( function () {
var log = console.log
, net = require( 'net' )
, util = require( 'util' )
, Bolgia = require( 'bolgia' )
- 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 commands
has 343 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.commands = function () {
var keys = Object.keys
, minimatch = require( 'minimatch' )
, wmsg = function ( cmd ) {
Function Vapid
has 301 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.Vapid = ( function () {
var log = console.log
, net = require( 'net' )
, util = require( 'util' )
, Bolgia = require( 'bolgia' )
Function VapidParser
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
exports.VapidParser = ( function () {
var bconcat = Buffer.concat
, util = require( 'util' )
, emitter = require( 'events' ).EventEmitter
, Bolgia = require( 'bolgia' )
- 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 VapidParser
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.VapidParser = ( function () {
var bconcat = Buffer.concat
, util = require( 'util' )
, emitter = require( 'events' ).EventEmitter
, Bolgia = require( 'bolgia' )
File pubsub.js
has 345 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* PUBSUB mix-ins.
*/
exports.commands = function () {
Function Vapid
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
, Vapid = function ( opt ) {
var me = this
, is = me instanceof Vapid
;
if ( ! is ) return new Vapid( opt );
File vapid.js
has 303 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Vapid, a vacuous Redis implementation for connection tests,
* with a fully functional PubSub system for multiple clients.
*
* Copyright(c) 2014 Guglielmo Ferri <44gatti@gmail.com>
Function BulkRule
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
exports.BulkRule = ( function () {
var Rule = require('./rule').Rule
, util = require( 'util' )
, BulkRule = function ( char ) {
var me = 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 onConnection
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
, onConnection = function ( sock ) {
var me = this
, clients = me.clients
, cqueues = me.cqueues
, parsers = me.parsers
Function commands
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
exports.commands = function () {
var wmsg = function ( cmd ) {
return '-ERR wrong number of arguments for \'' + cmd + '\' command\r\n';
}
- 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 unsubscribe
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
, unsubscribe : function ( command, args, sock ) {
var me = this
, channels = me.pubsub.channels
, alen = args.length
, a = 0
Function punsubscribe
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
, punsubscribe : function ( command, args, sock ) {
var me = this
, patterns = me.pubsub.patterns
, alen = args.length
, a = 0
Function BulkRule
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.BulkRule = ( function () {
var Rule = require('./rule').Rule
, util = require( 'util' )
, BulkRule = function ( char ) {
var me = this
Function commands
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.commands = function () {
var wmsg = function ( cmd ) {
return '-ERR wrong number of arguments for \'' + cmd + '\' command\r\n';
}
Function resetSubscriptions
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
, resetSubscriptions = function ( sock, pubsub ) {
var pchannels = pubsub.channels
, ppatterns = pubsub.patterns
, schannels = sock.pubsub.channels
, spatterns = sock.pubsub.patterns
Function psubscribe
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
, psubscribe : function ( command, args, sock ) {
var me = this
, patterns = me.pubsub.patterns
, spatterns = null
, alen = args.length
Function channels
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
channels : function ( command, args, sock ) {
var me = this
, channels = me.pubsub.channels
, alen = args.length
, cmd = command[ 1 ]
Function Rule
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.Rule = ( function () {
var emitter = require('events').EventEmitter
, util = require( 'util' )
, Abaco = require( 'abaco' )
, max = Math.max