Showing 2,898 of 2,898 total issues

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

  var he = createCommonjsModule(function (module, exports) {
  (function(root) {

      // Detect free variables `exports`.
      var freeExports = exports;
Severity: Major
Found in packages/vue-server-renderer/basic.js and 1 other location - About 4 mos to fix
packages/vue-template-compiler/browser.js on lines 2242..2579

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

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

  var he = createCommonjsModule(function (module, exports) {
  (function(root) {

      // Detect free variables `exports`.
      var freeExports = exports;
Severity: Major
Found in packages/vue-template-compiler/browser.js and 1 other location - About 4 mos to fix
packages/vue-server-renderer/basic.js on lines 3037..3374

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

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 weexFactory has a Cognitive Complexity of 2888 (exceeds 5 allowed). Consider refactoring.
Open

module.exports = function weexFactory (exports, document) {

/*  */

var emptyObject = Object.freeze({});
Severity: Minor
Found in packages/weex-vue-framework/factory.js - About 2 mos 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 weexFactory has 5927 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function weexFactory (exports, document) {

/*  */

var emptyObject = Object.freeze({});
Severity: Major
Found in packages/weex-vue-framework/factory.js - About 1 mo to fix

    File build.dev.js has 7613 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    'use strict';
    
    Object.defineProperty(exports, '__esModule', { value: true });
    
    function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
    Severity: Major
    Found in packages/vue-server-renderer/build.dev.js - About 3 wks to fix

      File basic.js has 7079 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      (function (global, factory) {
        typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
        typeof define === 'function' && define.amd ? define(factory) :
        (global = global || self, global.renderVueComponentToString = factory());
      }(this, function () { 'use strict';
      Severity: Major
      Found in packages/vue-server-renderer/basic.js - About 2 wks to fix

        File factory.js has 5930 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        'use strict';
        
        
        
        module.exports = function weexFactory (exports, document) {
        Severity: Major
        Found in packages/weex-vue-framework/factory.js - About 2 wks to fix

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

            function parse (
              template,
              options
            ) {
              warn$1 = options.warn || baseWarn;
          Severity: Major
          Found in packages/vue-server-renderer/basic.js and 2 other locations - About 2 wks to fix
          packages/vue-server-renderer/build.dev.js on lines 3623..3948
          packages/vue-template-compiler/browser.js on lines 2783..3108

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

          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

            function parse (
              template,
              options
            ) {
              warn$1 = options.warn || baseWarn;
          Severity: Major
          Found in packages/vue-template-compiler/browser.js and 2 other locations - About 2 wks to fix
          packages/vue-server-renderer/basic.js on lines 3873..4198
          packages/vue-server-renderer/build.dev.js on lines 3623..3948

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

          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

          function parse (
            template,
            options
          ) {
            warn$1 = options.warn || baseWarn;
          Severity: Major
          Found in packages/vue-server-renderer/build.dev.js and 2 other locations - About 2 wks to fix
          packages/vue-server-renderer/basic.js on lines 3873..4198
          packages/vue-template-compiler/browser.js on lines 2783..3108

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

          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

          function parseHTML (html, options) {
            var stack = [];
            var expectHTML = options.expectHTML;
            var isUnaryTag$$1 = options.isUnaryTag || no;
            var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;
          Severity: Major
          Found in packages/weex-template-compiler/build.js and 1 other location - About 1 wk to fix
          packages/vue-template-compiler/build.js on lines 299..551

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

          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

          function parseHTML (html, options) {
            var stack = [];
            var expectHTML = options.expectHTML;
            var isUnaryTag$$1 = options.isUnaryTag || no;
            var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;
          Severity: Major
          Found in packages/vue-template-compiler/build.js and 1 other location - About 1 wk to fix
          packages/weex-template-compiler/build.js on lines 298..550

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

          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

            function parseHTML (html, options) {
              var stack = [];
              var expectHTML = options.expectHTML;
              var isUnaryTag$$1 = options.isUnaryTag || no;
              var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;
          Severity: Major
          Found in packages/vue-server-renderer/basic.js and 1 other location - About 1 wk to fix
          packages/vue-server-renderer/build.dev.js on lines 3168..3419

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

          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

          function parseHTML (html, options) {
            var stack = [];
            var expectHTML = options.expectHTML;
            var isUnaryTag$$1 = options.isUnaryTag || no;
            var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;
          Severity: Major
          Found in packages/vue-server-renderer/build.dev.js and 1 other location - About 1 wk to fix
          packages/vue-server-renderer/basic.js on lines 3418..3669

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

          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

          File browser.js has 4505 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          (function (global, factory) {
            typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
            typeof define === 'function' && define.amd ? define(['exports'], factory) :
            (global = global || self, factory(global.VueTemplateCompiler = {}));
          }(this, function (exports) { 'use strict';
          Severity: Major
          Found in packages/vue-template-compiler/browser.js - About 1 wk to fix

            File build.js has 4232 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            'use strict';
            
            Object.defineProperty(exports, '__esModule', { value: true });
            
            function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
            Severity: Major
            Found in packages/vue-template-compiler/build.js - About 1 wk to fix

              File build.js has 3841 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              'use strict';
              
              Object.defineProperty(exports, '__esModule', { value: true });
              
              function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
              Severity: Major
              Found in packages/weex-template-compiler/build.js - About 1 wk to fix

                Function createPatchFunction has a Cognitive Complexity of 469 (exceeds 5 allowed). Consider refactoring.
                Open

                export function createPatchFunction (backend) {
                  let i, j
                  const cbs = {}
                
                  const { modules, nodeOps } = backend
                Severity: Minor
                Found in src/core/vdom/patch.js - About 1 wk 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 2 locations. Consider refactoring.
                Open

                  parseHTML(template, {
                    warn: warn,
                    expectHTML: options.expectHTML,
                    isUnaryTag: options.isUnaryTag,
                    canBeLeftOpenTag: options.canBeLeftOpenTag,
                Severity: Major
                Found in packages/weex-template-compiler/build.js and 1 other location - About 1 wk to fix
                packages/vue-template-compiler/build.js on lines 2532..2726

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

                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

                  parseHTML(template, {
                    warn: warn$1,
                    expectHTML: options.expectHTML,
                    isUnaryTag: options.isUnaryTag,
                    canBeLeftOpenTag: options.canBeLeftOpenTag,
                Severity: Major
                Found in packages/vue-template-compiler/build.js and 1 other location - About 1 wk to fix
                packages/weex-template-compiler/build.js on lines 1340..1534

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

                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