rootslab/abaco

View on GitHub

Showing 16 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

    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

            Avoid too many return statements within this function.
            Open

                            return sign * ( ipart + fpart );
            Severity: Major
            Found in lib/abaco.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                                  if ( n >= bs ) return NaN;
              Severity: Major
              Found in lib/abaco.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                return sum * sign;
                Severity: Major
                Found in lib/abaco.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                  return sign * ( ipart + fpart );
                  Severity: Major
                  Found in lib/abaco.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return sum * sign;
                    Severity: Major
                    Found in lib/abaco.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return sign * ( ipart + fpart );
                      Severity: Major
                      Found in lib/abaco.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                        if ( n >= bs ) return NaN;
                        Severity: Major
                        Found in lib/abaco.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                      return sign * ( ipart + fpart );
                          Severity: Major
                          Found in lib/abaco.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                            if ( n >= bs ) return NaN;
                            Severity: Major
                            Found in lib/abaco.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                          return sum * sign;
                              Severity: Major
                              Found in lib/abaco.js - About 30 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language