rootslab/abaco

View on GitHub

Showing 30 of 30 total issues

Function Abaco has a Cognitive Complexity of 140 (exceeds 5 allowed). Consider refactoring.
Open

exports.Abaco = ( function () {
    var isArray = Array.isArray
        , min = Math.min
        , pow = Math.pow
        /* 
Severity: Minor
Found in lib/abaco.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 Abaco has 239 lines of code (exceeds 25 allowed). Consider refactoring.
Open

exports.Abaco = ( function () {
    var isArray = Array.isArray
        , min = Math.min
        , pow = Math.pow
        /* 
Severity: Major
Found in lib/abaco.js - About 1 day to fix

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

    var log = console.log
        , Abaco = require( '../' )
        , s0 = '12'
        , s1 = '1234'
        , s2 = '12345678'
    Severity: Major
    Found in bench/abaco-parseInt-bench.js and 3 other locations - About 1 day to fix
    bench/abaco-parseFloat-bench.js on lines 5..32
    bench/abaco-xparseFloat-bench.js on lines 5..31
    bench/abaco-xparseInt-bench.js on lines 5..31

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

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

    var log = console.log
        , Abaco = require( '../' )
        , s0 = '12'
        , s1 = '1234'
        , s2 = '12345678'
    Severity: Major
    Found in bench/abaco-xparseInt-bench.js and 3 other locations - About 1 day to fix
    bench/abaco-parseFloat-bench.js on lines 5..32
    bench/abaco-parseInt-bench.js on lines 5..31
    bench/abaco-xparseFloat-bench.js on lines 5..31

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

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

    var log = console.log
        , Abaco = require( '../' )
        , s0 = '12.0001'
        , s1 = '1234.001'
        , s2 = '12345.678'
    Severity: Major
    Found in bench/abaco-parseFloat-bench.js and 3 other locations - About 1 day to fix
    bench/abaco-parseInt-bench.js on lines 5..31
    bench/abaco-xparseFloat-bench.js on lines 5..31
    bench/abaco-xparseInt-bench.js on lines 5..31

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

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

    var log = console.log
        , Abaco = require( '../' )
        , s0 = '12.0001'
        , s1 = '1234.001'
        , s2 = '12345.678'
    Severity: Major
    Found in bench/abaco-xparseFloat-bench.js and 3 other locations - About 1 day to fix
    bench/abaco-parseFloat-bench.js on lines 5..32
    bench/abaco-parseInt-bench.js on lines 5..31
    bench/abaco-xparseInt-bench.js on lines 5..31

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

    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

                var b = buff
                    , blen = b.length
                    , bs = base || 10
                    , t = npow[ bs ]
                    , s = start || 0
    Severity: Major
    Found in lib/abaco.js and 1 other location - About 3 hrs to fix
    lib/abaco.js on lines 253..266

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

    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

            , parseIntArray = function ( arr, base ) {
                var a = isArray( arr ) ? arr : [ arr ]
                    , alen = a.length
                    , bs = base || 10
                    , v = null
    Severity: Major
    Found in lib/abaco.js and 1 other location - About 3 hrs to fix
    lib/abaco.js on lines 86..98

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

    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

                var b = buff
                    , blen = b.length
                    , bs = base || 10
                    , t = npow[ bs ]
                    , s = start || 0
    Severity: Major
    Found in lib/abaco.js and 1 other location - About 3 hrs to fix
    lib/abaco.js on lines 191..204

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

    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

            , parseFloatArray = function ( arr, base ) {
                var a = isArray( arr ) ? arr : [ arr ]
                    , alen = a.length
                    , bs = base || 10
                    , v = null
    Severity: Major
    Found in lib/abaco.js and 1 other location - About 3 hrs to fix
    lib/abaco.js on lines 72..84

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

    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

                var b = buff
                    , blen = b.length
                    , bs = base || 10
                    , t = tpow[ bs ]
                    , s = start || 0
    Severity: Major
    Found in lib/abaco.js and 1 other location - About 2 hrs to fix
    lib/abaco.js on lines 102..112

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

    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

                var b = buff
                    , blen = b.length
                    , bs = base || 10
                    , t = tpow[ bs ]
                    , s = start || 0
    Severity: Major
    Found in lib/abaco.js and 1 other location - About 2 hrs to fix
    lib/abaco.js on lines 146..156

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

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

            , xparseFloat =function ( buff, base, start, end ) {
                var b = buff
                    , blen = b.length
                    , bs = base || 10
                    , t = npow[ bs ]
    Severity: Minor
    Found in lib/abaco.js - About 1 hr to fix

      Function parseFloat has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              , parseFloat = function ( buff, base, start, end ) {
                  var b = buff
                      , blen = b.length
                      , bs = base || 10
                      , t = npow[ bs ]
      Severity: Minor
      Found in lib/abaco.js - About 1 hr to fix

        Function xparseInt has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                , xparseInt = function ( buff, base, start, end ) {
                    var b = buff
                        , blen = b.length
                        , bs = base || 10
                        , t = tpow[ bs ]
        Severity: Minor
        Found in lib/abaco.js - About 1 hr to fix

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

                  , parseInt = function ( buff, base, start, end ) {
                      var b = buff
                          , blen = b.length
                          , bs = base || 10
                          , t = tpow[ bs ]
          Severity: Minor
          Found in lib/abaco.js - About 1 hr to fix

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

                            for ( ; ~ p; ) {
                                n = b[ s++ ] - 48;
                                n -= ( n < 10 ) ? 0 : 39;
                                sum += n * t[ p-- ];
                            }
            Severity: Major
            Found in lib/abaco.js and 1 other location - About 1 hr to fix
            lib/abaco.js on lines 237..241

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

            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

                            for ( ; s < e; ) {
                                n = b[ s++ ] - 48;
                                n -= ( n < 10 ) ? 0 : 39;
                                fpart += n * t[ p++ ];
                            }
            Severity: Major
            Found in lib/abaco.js and 1 other location - About 1 hr to fix
            lib/abaco.js on lines 126..130

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

            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

                        for ( ; ~ p; ) {
                            n = b[ s++ ] - 48;
                            if ( n >= bs ) return NaN;
                            sum += n * t[ p-- ];
                        }
            Severity: Minor
            Found in lib/abaco.js and 1 other location - About 40 mins to fix
            lib/abaco.js on lines 309..313

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

            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

                        for ( ; s < e; ) {
                            n = b[ s++ ] - 48;
                            if ( n >= bs ) return NaN;
                            fpart += n * t[ p++ ];
                        }
            Severity: Minor
            Found in lib/abaco.js and 1 other location - About 40 mins to fix
            lib/abaco.js on lines 180..184

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

            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