dockyard/es6_module_transpiler-rails

View on GitHub

Showing 225 of 225 total issues

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

    function filterCommentLocation() {
        var i, entry, comment, comments = [];

        for (i = 0; i < extra.comments.length; ++i) {
            entry = extra.comments[i];
Severity: Major
Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 6 hrs to fix
lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 5421..5440

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

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

            if (existingPropNames[propType].hasOwnProperty(key.name)) {
                isValidDuplicateProp =
                    // There isn't already a getter for this prop
                    existingPropNames[propType][key.name].get === undefined
                    // There isn't already a data prop by this name
Severity: Major
Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 6 hrs to fix
lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 4928..4941

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

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

            if (existingPropNames[propType].hasOwnProperty(key.name)) {
                isValidDuplicateProp =
                    // There isn't already a setter for this prop
                    existingPropNames[propType][key.name].set === undefined
                    // There isn't already a data prop by this name
Severity: Major
Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 6 hrs to fix
lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 4898..4911

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

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

},{"./amd_compiler":3,"./cjs_compiler":4,"./globals_compiler":7,"./parser":9,"./utils":11,"./yui_compiler":12}],7:[function(require,module,exports){
"use strict";
var $__superDescriptor = function(proto, name) {
  if (!proto) throw new TypeError('super is null');
  return Object.getPropertyDescriptor(proto, name);
Severity: Major
Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 5 hrs to fix

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

                } else if (match('[')) {
                    expr = delegate.createMemberExpression('[', expr, parseComputedMember());
                    marker.end();
                    marker.apply(expr);
                } else if (match('.')) {
    Severity: Major
    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 5 hrs to fix
    lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 5539..5551

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

    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 (match('[')) {
                    expr = delegate.createMemberExpression('[', expr, parseComputedMember());
                    marker.end();
                    marker.apply(expr);
                } else if (match('.')) {
    Severity: Major
    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 5 hrs to fix
    lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 5571..5583

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

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

    },{"./abstract_compiler":2,"./source_modifier":10}],4:[function(require,module,exports){
    "use strict";
    var $__superDescriptor = function(proto, name) {
      if (!proto) throw new TypeError('super is null');
      return Object.getPropertyDescriptor(proto, name);
    Severity: Major
    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 5 hrs to fix

      Function 3 has 131 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      },{"./compile_error":5,"./utils":11}],3:[function(require,module,exports){
      "use strict";
      var $__superDescriptor = function(proto, name) {
        if (!proto) throw new TypeError('super is null');
        return Object.getPropertyDescriptor(proto, name);
      Severity: Major
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 5 hrs to fix

        Function 2 has 127 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        },{}],2:[function(require,module,exports){
        "use strict";
        var $__getDescriptors = function(object) {
          var descriptors = {}, name, names = Object.getOwnPropertyNames(object);
          for (var i = 0; i < names.length; i++) {
        Severity: Major
        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 5 hrs to fix

          Function scanComment has 116 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function scanComment() {
                  var comment, ch, loc, start, blockComment, lineComment;
          
                  comment = '';
                  blockComment = false;
          Severity: Major
          Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 4 hrs to fix

            Function 11 has 115 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            },{}],11:[function(require,module,exports){
            "use strict";
            var $__getDescriptors = function(object) {
              var descriptors = {}, name, names = Object.getOwnPropertyNames(object);
              for (var i = 0; i < names.length; i++) {
            Severity: Major
            Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 4 hrs to fix

              Function 12 has 114 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              },{}],12:[function(require,module,exports){
              "use strict";
              var $__superDescriptor = function(proto, name) {
                if (!proto) throw new TypeError('super is null');
                return Object.getPropertyDescriptor(proto, name);
              Severity: Major
              Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 4 hrs to fix

                Function scanTemplate has 108 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function scanTemplate() {
                        var cooked = '', ch, start, terminated, tail, restore, unescaped, code, octal;
                
                        terminated = false;
                        tail = false;
                Severity: Major
                Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 4 hrs to fix

                  Function 9 has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  },{"./abstract_compiler":2,"./amd_compiler":3,"./cjs_compiler":4,"./compiler":6,"./globals_compiler":7,"./source_modifier":10,"./yui_compiler":12}],9:[function(require,module,exports){
                  "use strict";
                  var $__getDescriptors = function(object) {
                    var descriptors = {}, name, names = Object.getOwnPropertyNames(object);
                    for (var i = 0; i < names.length; i++) {
                  Severity: Major
                  Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 4 hrs to fix

                    Function GlobalsCompiler has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var GlobalsCompiler = function($__super) {
                      'use strict';
                      var $__proto = $__getProtoParent($__super);
                      var $GlobalsCompiler = ($__createClass)({
                        constructor: function() {
                    Severity: Major
                    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 4 hrs to fix

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

                      var AbstractCompiler = function() {
                        'use strict';
                        var $AbstractCompiler = ($__createClassNoExtends)({
                          constructor: function(compiler, options) {
                            this.compiler = compiler;
                      Severity: Major
                      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 4 hrs to fix

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

                                    if (extra.loc) {
                                        node.loc = {
                                            start: {
                                                line: this.loc.start.line,
                                                column: this.loc.start.column
                        Severity: Major
                        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 4 hrs to fix
                        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 5469..5481

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

                        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

                                    if (extra.loc) {
                                        node.groupLoc = {
                                            start: {
                                                line: this.loc.start.line,
                                                column: this.loc.start.column
                        Severity: Major
                        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 4 hrs to fix
                        lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 5493..5505

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

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

                            function patch() {
                        
                                var wrapTracking;
                        
                                if (extra.comments) {
                        Severity: Major
                        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 4 hrs to fix

                          Function scanStringLiteral has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function scanStringLiteral() {
                                  var str = '', quote, start, ch, code, unescaped, restore, octal = false;
                          
                                  quote = source[index];
                                  assert((quote === '\'' || quote === '"'),
                          Severity: Major
                          Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 3 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language