Showing 63 of 94 total issues
Function init
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
, init : function ( cback, lback, file_opt, cache_init_opt ) {
var me = this
, file_cfg = improve( file_opt || {}, file_load_opt )
, cache_cfg = cache_init_opt ? improve( cache_init_opt, camphora_opt ) : null
, next = typeof cback === 'function' ? cback : emptyFn
Function infos
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.infos = ( function () {
return {
discard : {
Function commands
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
exports.commands = function ( encode, error ) {
var Abaco = require( 'abaco' )
, Bolgia = require( 'bolgia' )
, parseIntArray = Abaco.parseIntArray
, doString = Bolgia.doString
- 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 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.commands = function ( encode, error ) {
return {
auth : function ( passwd, cback ) {
Function monitor
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
monitor : function ( mmsg ) {
if ( typeof( mmsg ) !== 'string' ) return;
var mlen = mmsg.length
, s = 0
, t = 0
Function commands
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.commands = function ( encode, error ) {
var isArray = Array.isArray
;
return {
Function parseRedisInfo
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
, parseRedisInfo = function ( data ) {
var str = String( data )
// skip first 2 bytes : '# '
, sections = str.slice( 2, str.length ).split( '\r\n# ' )
, slen = sections.length
Function parseClientList
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
, parseClientList = function ( data ) {
var rows = String( data ).split( '\n' )
, i = 0
, row = rows[ 0 ]
, rlen = rows.length
Function infos
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.infos = ( function () {
return {
pfadd : {
Function parseRoleReply
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
, parseRoleReply = function ( arr ) {
var a = isArray( arr ) ? arr : []
, alen = a.length
, type = null
;
Function exports
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = ( function () {
var Bolgia = require( 'bolgia' )
, mix = Bolgia.mix
, files = [
'connection'
Function commands
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
exports.commands = function ( encode, error ) {
var Abaco = require( 'abaco' )
, parseIntArray = Abaco.parseIntArray
, isArray = Array.isArray
// handler for unsubscribe and punscubscripe
- 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 stick
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
, stick = function ( enable, type, prefix ) {
var p = prefix || ''
, en = ( doString( enable ) === ooo.und ) ? true : enable
, o = null
, obj = type || syllabus.commands
Function parseConfigGet
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
, parseConfigGet = function ( arr ) {
var a = isArray( arr ) ? arr : []
, alen = a.length
, i = 0
, k = null
Function georadius
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
, georadius : function ( key, lon, lat, radius, unit, opt, cback ) {
Function zrangebyscore
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
, zrangebyscore : function ( key, min, max, withscores, limit, cback ) {
Function zrevrangebyscore
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
, zrevrangebyscore : function ( key, start, stop, withscores, limit, cback ) {
Function commands
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
exports.commands = function ( encode, error ) {
var Abaco = require( 'abaco' )
, parseIntArray = Abaco.parseIntArray
, isArray = Array.isArray
;
- 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 georadiusbymember
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
, georadiusbymember : function ( key, member, radius, unit, opt, cback ) {
Function zrangebylex
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
, zrangebylex : function ( key, min, max, limit, cback ) {