fnando/babel-schmooze-sprockets

View on GitHub

Showing 215 of 215 total issues

Method has too many lines. [22/10]
Open

    def call(input)
      data = input[:data]

      result = input[:cache].fetch(@cache_key + [input[:filename]] + [data]) do
        options = {

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Function 21 has 75 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"10":10,"17":17}],21:[function(_dereq_,module,exports){
'use strict';
var redefineAll       = _dereq_(86)
  , getWeak           = _dereq_(62).getWeak
  , anObject          = _dereq_(7)
Severity: Major
Found in app/assets/javascripts/babel/polyfill.js - About 3 hrs to fix

    Function 22 has 72 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{"12":12,"37":37,"39":39,"49":49,"6":6,"62":62,"7":7,"86":86}],22:[function(_dereq_,module,exports){
    'use strict';
    var global            = _dereq_(38)
      , $export           = _dereq_(32)
      , redefine          = _dereq_(87)
    Severity: Major
    Found in app/assets/javascripts/babel/polyfill.js - About 2 hrs to fix

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

      },{}],104:[function(_dereq_,module,exports){
      var ctx                = _dereq_(25)
        , invoke             = _dereq_(44)
        , html               = _dereq_(41)
        , cel                = _dereq_(29)
      Severity: Major
      Found in app/assets/javascripts/babel/polyfill.js - About 2 hrs to fix

        Function 63 has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
        Open

        },{"114":114,"34":34,"39":39,"49":49,"67":67}],63:[function(_dereq_,module,exports){
        var Map     = _dereq_(150)
          , $export = _dereq_(32)
          , shared  = _dereq_(94)('metadata')
          , store   = shared.store || (shared.store = new (_dereq_(256)));
        Severity: Minor
        Found in app/assets/javascripts/babel/polyfill.js - About 2 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 97 has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
        Open

        },{"34":34}],97:[function(_dereq_,module,exports){
        var toInteger = _dereq_(106)
          , defined   = _dereq_(27);
        // true  -> String#at
        // false -> String#codePointAt
        Severity: Minor
        Found in app/assets/javascripts/babel/polyfill.js - About 2 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 53 has 61 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        },{"117":117,"40":40,"66":66,"85":85,"92":92}],53:[function(_dereq_,module,exports){
        'use strict';
        var LIBRARY        = _dereq_(58)
          , $export        = _dereq_(32)
          , redefine       = _dereq_(87)
        Severity: Major
        Found in app/assets/javascripts/babel/polyfill.js - About 2 hrs to fix

          Function 65 has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
          Open

          },{"104":104,"18":18,"38":38}],65:[function(_dereq_,module,exports){
          'use strict';
          // 19.1.2.1 Object.assign(target, source, ...)
          var getKeys  = _dereq_(76)
            , gOPS     = _dereq_(73)
          Severity: Minor
          Found in app/assets/javascripts/babel/polyfill.js - About 2 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 168 has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          },{"32":32}],168:[function(_dereq_,module,exports){
          'use strict';
          var global            = _dereq_(38)
            , has               = _dereq_(39)
            , cof               = _dereq_(18)
          Severity: Major
          Found in app/assets/javascripts/babel/polyfill.js - About 2 hrs to fix

            Function 219 has 59 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            },{"35":35}],219:[function(_dereq_,module,exports){
            // @@split logic
            _dereq_(35)('split', 2, function(defined, SPLIT, $split){
              'use strict';
              var isRegExp   = _dereq_(50)
            Severity: Major
            Found in app/assets/javascripts/babel/polyfill.js - About 2 hrs to fix

              Consider simplifying this complex logical expression.
              Open

              if(_dereq_(28) && (!CORRECT_NEW || _dereq_(34)(function(){
                re2[_dereq_(117)('match')] = false;
                // RegExp constructor can alter flags and IsRegExp works correct with @@match
                return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
              }))){
              Severity: Critical
              Found in app/assets/javascripts/babel/polyfill.js - About 2 hrs to fix

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

                module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){
                  var Base  = global[NAME]
                    , C     = Base
                    , ADDER = IS_MAP ? 'set' : 'add'
                    , proto = C && C.prototype
                Severity: Major
                Found in app/assets/javascripts/babel/polyfill.js - About 2 hrs to fix

                  Function 293 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                  Open

                  },{"32":32,"38":38}],293:[function(_dereq_,module,exports){
                  var $iterators    = _dereq_(131)
                    , redefine      = _dereq_(87)
                    , global        = _dereq_(38)
                    , hide          = _dereq_(40)
                  Severity: Minor
                  Found in app/assets/javascripts/babel/polyfill.js - About 2 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 133 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                  Open

                  },{"107":107,"32":32,"45":45,"96":96}],133:[function(_dereq_,module,exports){
                  'use strict';
                  var $export       = _dereq_(32)
                    , toIObject     = _dereq_(107)
                    , toInteger     = _dereq_(106)
                  Severity: Minor
                  Found in app/assets/javascripts/babel/polyfill.js - About 2 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 44 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                  Open

                  },{"49":49,"90":90}],44:[function(_dereq_,module,exports){
                  // fast apply, http://jsperf.lnkit.com/fast-apply/5
                  module.exports = function(fn, args, that){
                    var un = that === undefined;
                    switch(args.length){
                  Severity: Minor
                  Found in app/assets/javascripts/babel/polyfill.js - About 2 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 64 has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  },{"150":150,"256":256,"32":32,"94":94}],64:[function(_dereq_,module,exports){
                  var global    = _dereq_(38)
                    , macrotask = _dereq_(104).set
                    , Observer  = global.MutationObserver || global.WebKitMutationObserver
                    , process   = global.process
                  Severity: Major
                  Found in app/assets/javascripts/babel/polyfill.js - About 2 hrs to fix

                    Function e has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                    Open

                    (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
                    Severity: Minor
                    Found in app/assets/javascripts/babel/polyfill.js - About 2 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 14 has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                    Open

                    },{"108":108,"109":109,"3":3,"45":45}],14:[function(_dereq_,module,exports){
                    var isObject = _dereq_(49)
                      , isArray  = _dereq_(47)
                      , SPECIES  = _dereq_(117)('species');
                    
                    Severity: Minor
                    Found in app/assets/javascripts/babel/polyfill.js - About 2 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 getConstructor has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
                        var C = wrapper(function(that, iterable){
                          anInstance(that, C, NAME, '_i');
                          that._i = create(null); // index
                          that._f = undefined;    // first entry
                    Severity: Major
                    Found in app/assets/javascripts/babel/polyfill.js - About 2 hrs to fix

                      Consider simplifying this complex logical expression.
                      Open

                          if(isTAIndex(target, key = toPrimitive(key, true))
                            && isObject(desc)
                            && has(desc, 'value')
                            && !has(desc, 'get')
                            && !has(desc, 'set')
                      Severity: Critical
                      Found in app/assets/javascripts/babel/polyfill.js - About 2 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language