rootslab/syllabus

View on GitHub

Showing 94 of 94 total issues

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

exports.commands = function ( encode, error ) {
    var Abaco = require( 'abaco' )
        , parseIntArray = Abaco.parseIntArray
        , parseFloatArray = Abaco.parseFloatArray
        , Bolgia = require( 'bolgia' )
Severity: Major
Found in lib/commands/sortedsets.js - About 6 hrs to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        return {
    
            geoadd : {
                rtype : ':'
                , since : '3.2.0'
    Severity: Major
    Found in lib/infos/geo.js and 1 other location - About 6 hrs to fix
    lib/infos/server.js on lines 24..69

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 158.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            , client : {
    
                reply : {
                     rtype : '+'
                    , since : '3.2.0'
    Severity: Major
    Found in lib/infos/server.js and 1 other location - About 6 hrs to fix
    lib/infos/geo.js on lines 7..49

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 158.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function exports has 148 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = ( function () {
        var fs = require( 'fs' )
            , util = require( 'util' )
            , Bolgia = require( 'bolgia' )
            , Camphora = require( 'camphora' )
    Severity: Major
    Found in lib/lua/index.js - About 5 hrs to fix

      Function exports has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
      Open

      module.exports = ( function () {
          var fs = require( 'fs' )
              , util = require( 'util' )
              , Bolgia = require( 'bolgia' )
              , Camphora = require( 'camphora' )
      Severity: Minor
      Found in lib/lua/index.js - About 5 hrs 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 Syllabus has 140 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      exports.Syllabus = function ( develop ) {
          var Bolgia = require( 'bolgia' )
              , Hoar = require( 'hoar' )
              , lte = Hoar.lte
              , doString = Bolgia.doString
      Severity: Major
      Found in lib/syllabus.js - About 5 hrs to fix

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

        exports.infos = ( function () {
        
            return {
        
                zadd : {
        Severity: Major
        Found in lib/infos/sortedsets.js - About 5 hrs to fix

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

          exports.commands = function ( encode, error ) {
              var Abaco = require( 'abaco' )
                  , Bolgia = require( 'bolgia' )
                  , parseIntArray = Abaco.parseIntArray
                  , parseFloatArray = Abaco.parseFloatArray
          Severity: Major
          Found in lib/commands/hashes.js - About 4 hrs to fix

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

            exports.infos = ( function () {
            
                return {
            
                    blpop : {
            Severity: Major
            Found in lib/infos/lists.js - About 4 hrs to fix

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                      , brpop : function ( keys, timeout, cback ) {
                          var t = + timeout || 0
                              , list = keys
                              ;
                          if ( list === undefined ) return error( 'BRPOP', arguments );
              Severity: Major
              Found in lib/commands/lists.js and 1 other location - About 4 hrs to fix
              lib/commands/lists.js on lines 13..23

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 116.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                      blpop : function ( keys, timeout, cback ) {
                          var t = + timeout || 0
                              , list = keys
                              ;
                          if ( list === undefined ) return error( 'BLPOP', arguments );
              Severity: Major
              Found in lib/commands/lists.js and 1 other location - About 4 hrs to fix
              lib/commands/lists.js on lines 25..35

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 116.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

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

              exports.commands = function ( encode, error ) {
                  var Abaco = require( 'abaco' )
                      , parseIntArray = Abaco.parseIntArray
                      , Bolgia = require( 'bolgia' )
                      , doString = Bolgia.doString
              Severity: Major
              Found in lib/commands/sets.js - About 3 hrs to fix

                Function exports has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                module.exports = ( function () {
                    var util = require( 'util' )
                        , Bolgia = require( 'bolgia' )
                        , mix = Bolgia.mix
                        , ooo = Bolgia.circles
                Severity: Major
                Found in lib/commands/index.js - About 3 hrs to fix

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

                  exports.infos = ( function () {
                  
                      return {
                  
                          hdel : {
                  Severity: Major
                  Found in lib/infos/hashes.js - About 3 hrs to fix

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

                    exports.infos = ( function () {
                    
                        return {
                    
                            sadd : {
                    Severity: Major
                    Found in lib/infos/sets.js - About 3 hrs to fix

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

                      exports.commands = function ( encode, error ) {
                          var Abaco = require( 'abaco' )
                              , parseIntArray = Abaco.parseIntArray
                              , isArray = Array.isArray
                              ;
                      Severity: Major
                      Found in lib/commands/lists.js - About 3 hrs to fix

                        File server.js has 300 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /*
                         * SERVER mix-ins.
                         */
                        
                        exports.commands = function ( encode, error ) {
                        Severity: Minor
                        Found in lib/commands/server.js - About 3 hrs to fix

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  , zrangebyscore : function ( key, min, max, withscores, limit, cback ) {
                                      var list = [ min, max ];
                                      if ( key === undefined ) return error( 'ZRANGEBYSCORE', arguments );
                                      if ( withscores ) list.push( 'WITHSCORES' );
                                      if ( isArray( limit ) ) list = list.concat( 'LIMIT' ).concat( limit );
                          Severity: Major
                          Found in lib/commands/sortedsets.js and 1 other location - About 3 hrs to fix
                          lib/commands/sortedsets.js on lines 148..155

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 99.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  , object : {
                          
                                      refcount : {
                                          rtype : ':'
                                          , since : '2.2.3'
                          Severity: Major
                          Found in lib/infos/keys.js and 1 other location - About 3 hrs to fix
                          lib/infos/pubsub.js on lines 16..42

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 99.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  , zrevrangebyscore : function ( key, start, stop, withscores, limit, cback ) {
                                      var list = [ start, stop ]
                                          ;
                                      if ( key === undefined )  return error( 'ZREVRANGEBYSCORE', arguments );
                                      if ( withscores ) list.push( 'WITHSCORES' );
                          Severity: Major
                          Found in lib/commands/sortedsets.js and 1 other location - About 3 hrs to fix
                          lib/commands/sortedsets.js on lines 112..118

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 99.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Severity
                          Category
                          Status
                          Source
                          Language