rootslab/syllabus

View on GitHub

Showing 94 of 94 total issues

Function commands has a Cognitive Complexity of 107 (exceeds 5 allowed). Consider refactoring.
Open

exports.commands = function ( encode, error ) {
    var Abaco = require( 'abaco' )
        , parseIntArray = Abaco.parseIntArray
        , Bolgia = require( 'bolgia' )
        , doString = Bolgia.doString
Severity: Minor
Found in lib/commands/keys.js - About 2 days 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 a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring.
Open

exports.Syllabus = function ( develop ) {
    var Bolgia = require( 'bolgia' )
        , Hoar = require( 'hoar' )
        , lte = Hoar.lte
        , doString = Bolgia.doString
Severity: Minor
Found in lib/syllabus.js - About 1 day 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 a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring.
Open

exports.commands = function ( encode, error ) {
    var Abaco = require( 'abaco' )
        , parseIntArray = Abaco.parseIntArray
        , Bolgia = require( 'bolgia' )
        , doString = Bolgia.doString
Severity: Minor
Found in lib/commands/server.js - About 1 day 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 298 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/server.js - About 1 day to fix

    Function commands has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring.
    Open

    exports.commands = function ( encode, error ) {
        var Abaco = require( 'abaco' )
            , Bolgia = require( 'bolgia' )
            , parseIntArray = Abaco.parseIntArray
            , parseFloatArray = Abaco.parseFloatArray
    Severity: Minor
    Found in lib/commands/strings.js - About 1 day 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 a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
    Open

    exports.commands = function ( encode, error ) {
        var Abaco = require( 'abaco' )
            , parseIntArray = Abaco.parseIntArray
            , parseFloatArray = Abaco.parseFloatArray
            , Bolgia = require( 'bolgia' )
    Severity: Minor
    Found in lib/commands/sortedsets.js - About 1 day 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

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

            , zscan : function ( key, cursor, opt, cback ) {
                var list = null
                    , match = null
                    , count = null
                    , ctype = null
    Severity: Major
    Found in lib/commands/sortedsets.js and 2 other locations - About 1 day to fix
    lib/commands/hashes.js on lines 87..112
    lib/commands/sets.js on lines 84..109

    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 227.

    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 3 locations. Consider refactoring.
    Open

            , sscan : function ( key, cursor, opt, cback ) {
                var list = null
                    , match = null
                    , count = null
                    , ctype = null
    Severity: Major
    Found in lib/commands/sets.js and 2 other locations - About 1 day to fix
    lib/commands/hashes.js on lines 87..112
    lib/commands/sortedsets.js on lines 163..187

    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 227.

    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 3 locations. Consider refactoring.
    Open

            , hscan : function ( key, cursor, opt, cback ) {
                var list = null
                    , match = null
                    , count = null
                    , ctype = null
    Severity: Major
    Found in lib/commands/hashes.js and 2 other locations - About 1 day to fix
    lib/commands/sets.js on lines 84..109
    lib/commands/sortedsets.js on lines 163..187

    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 227.

    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

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

                if ( doString( opt ) === oobj ) { 
                    if ( doString( opt.with ) === oarr ) list = list.concat( opt.with );
                    if ( doString( opt.count ) === onum ) list = list.concat( 'COUNT' ).concat( opt.count );
                    if ( doString( opt.order ) === ostr ) list = list.concat( opt.order );
                    if ( doString( opt.store ) === ostr ) list = list.concat( 'STORE' ).concat( opt.store );
    Severity: Major
    Found in lib/commands/geo.js and 1 other location - About 1 day to fix
    lib/commands/geo.js on lines 80..86

    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 218.

    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

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

                if ( doString( opt ) === oobj ) { 
                    if ( doString( opt.with ) === oarr ) list = list.concat( opt.with );
                    if ( doString( opt.count ) === onum ) list = list.concat( 'COUNT' ).concat( opt.count );
                    if ( doString( opt.order ) === ostr ) list = list.concat( opt.order );
                    if ( doString( opt.store ) === ostr ) list = list.concat( 'STORE' ).concat( opt.store );
    Severity: Major
    Found in lib/commands/geo.js and 1 other location - About 1 day to fix
    lib/commands/geo.js on lines 64..70

    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 218.

    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 infos has 226 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    exports.infos = ( function () {
    
        return {
    
            bgrewriteaof : {
    Severity: Major
    Found in lib/infos/server.js - About 1 day to fix

      Function commands has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
      Open

      exports.commands = function ( encode, error ) {
          var Abaco = require( 'abaco' )
              , Bolgia = require( 'bolgia' )
              , parseIntArray = Abaco.parseIntArray
              , parseFloatArray = Abaco.parseFloatArray
      Severity: Minor
      Found in lib/commands/geo.js - About 1 day 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 195 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/keys.js - About 7 hrs to fix

        Function commands has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
        Open

        exports.commands = function ( encode, error ) {
            var Abaco = require( 'abaco' )
                , parseIntArray = Abaco.parseIntArray
                , Bolgia = require( 'bolgia' )
                , doString = Bolgia.doString
        Severity: Minor
        Found in lib/commands/sets.js - About 7 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 commands has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
        Open

        exports.commands = function ( encode, error ) {
            var Abaco = require( 'abaco' )
                , Bolgia = require( 'bolgia' )
                , parseIntArray = Abaco.parseIntArray
                , parseFloatArray = Abaco.parseFloatArray
        Severity: Minor
        Found in lib/commands/hashes.js - About 7 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 infos has 172 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        exports.infos = ( function () {
        
            return {
        
                append : {
        Severity: Major
        Found in lib/infos/strings.js - About 6 hrs to fix

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

          exports.infos = ( function () {
          
              return {
          
                  del : {
          Severity: Major
          Found in lib/infos/keys.js - About 6 hrs to fix

            Function commands has a Cognitive Complexity of 44 (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/lists.js - About 6 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 commands has 165 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/strings.js - About 6 hrs to fix
              Severity
              Category
              Status
              Source
              Language