rootslab/syllabus

View on GitHub

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
Severity: Minor
Found in lib/lua/index.js - About 1 hr to fix

    Function infos has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    exports.infos = ( function () {
    
        return {
    
            discard : {
    Severity: Minor
    Found in lib/infos/transactions.js - About 1 hr to fix

      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
      Severity: Minor
      Found in lib/commands/scripting.js - About 1 hr to fix

      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 ) {
      Severity: Minor
      Found in lib/commands/connection.js - About 1 hr to fix

        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
        Severity: Minor
        Found in lib/formatters/index.js - About 1 hr to fix

          Function commands has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          exports.commands = function ( encode, error ) {
              var isArray = Array.isArray
                  ;
          
              return {
          Severity: Minor
          Found in lib/commands/transactions.js - About 1 hr to fix

            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
            Severity: Minor
            Found in lib/commands/server.js - About 1 hr to fix

              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
              Severity: Minor
              Found in lib/commands/server.js - About 1 hr to fix

                Function infos has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                exports.infos = ( function () {
                
                    return {
                
                        pfadd : {
                Severity: Minor
                Found in lib/infos/hyperloglog.js - About 1 hr to fix

                  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
                                  ;
                  Severity: Minor
                  Found in lib/commands/server.js - About 1 hr to fix

                    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'
                    Severity: Minor
                    Found in lib/infos/index.js - About 1 hr to fix

                      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
                      Severity: Minor
                      Found in lib/commands/pubsub.js - About 1 hr to fix

                      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
                      Severity: Minor
                      Found in lib/syllabus.js - About 1 hr to fix

                        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
                        Severity: Minor
                        Found in lib/commands/server.js - About 1 hr to fix

                          Function georadius has 7 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  , georadius : function ( key, lon, lat, radius, unit, opt, cback ) {
                          Severity: Major
                          Found in lib/commands/geo.js - About 50 mins to fix

                            Function zrangebyscore has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    , zrangebyscore : function ( key, min, max, withscores, limit, cback ) {
                            Severity: Minor
                            Found in lib/commands/sortedsets.js - About 45 mins to fix

                              Function zrevrangebyscore has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      , zrevrangebyscore : function ( key, start, stop, withscores, limit, cback ) {
                              Severity: Minor
                              Found in lib/commands/sortedsets.js - About 45 mins to fix

                                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
                                        ;
                                Severity: Minor
                                Found in lib/commands/hyperloglog.js - About 45 mins to fix

                                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 ) {
                                Severity: Minor
                                Found in lib/commands/geo.js - About 45 mins to fix

                                  Function zrangebylex has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                          , zrangebylex : function ( key, min, max, limit, cback ) {
                                  Severity: Minor
                                  Found in lib/commands/sortedsets.js - About 35 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language