packages/weex-template-compiler/build.js

Summary

Maintainability
F
6 mos
Test Coverage

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 parseHTML has a Cognitive Complexity of 162 (exceeds 5 allowed). 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: Minor
    Found in packages/weex-template-compiler/build.js - About 3 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 parse has a Cognitive Complexity of 139 (exceeds 5 allowed). Consider refactoring.
    Open

    function parse (
      template,
      options
    ) {
      warn = options.warn || baseWarn;
    Severity: Minor
    Found in packages/weex-template-compiler/build.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 processAttrs has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring.
    Open

    function processAttrs (el) {
      var list = el.attrsList;
      var i, l, name, rawName, value, modifiers, syncGen, isDynamic;
      for (i = 0, l = list.length; i < l; i++) {
        name = rawName = list[i].name;
    Severity: Minor
    Found in packages/weex-template-compiler/build.js - About 1 day 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 parse has 270 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function parse (
      template,
      options
    ) {
      warn = options.warn || baseWarn;
    Severity: Major
    Found in packages/weex-template-compiler/build.js - About 1 day to fix

      Function parseHTML has 214 lines of code (exceeds 25 allowed). 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 - About 1 day to fix

        Function processSlotContent has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
        Open

        function processSlotContent (el) {
          var slotScope;
          if (el.tag === 'template') {
            slotScope = getAndRemoveAttr(el, 'scope');
            /* istanbul ignore if */
        Severity: Minor
        Found in packages/weex-template-compiler/build.js - About 1 day 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 parseFilters has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

        function parseFilters (exp) {
          var inSingle = false;
          var inDouble = false;
          var inTemplateString = false;
          var inRegex = false;
        Severity: Minor
        Found in packages/weex-template-compiler/build.js - About 7 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 createCompileToFunctionFn has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
        Open

        function createCompileToFunctionFn (compile) {
          var cache = Object.create(null);
        
          return function compileToFunctions (
            template,
        Severity: Minor
        Found in packages/weex-template-compiler/build.js - About 5 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 genHandler has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
        Open

        function genHandler (handler) {
          if (!handler) {
            return 'function(){}'
          }
        
        
        Severity: Minor
        Found in packages/weex-template-compiler/build.js - About 5 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 processAttrs has 123 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function processAttrs (el) {
          var list = el.attrsList;
          var i, l, name, rawName, value, modifiers, syncGen, isDynamic;
          for (i = 0, l = list.length; i < l; i++) {
            name = rawName = list[i].name;
        Severity: Major
        Found in packages/weex-template-compiler/build.js - About 4 hrs to fix

          Function createCompilerCreator has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
          Open

          function createCompilerCreator (baseCompile) {
            return function createCompiler (baseOptions) {
              function compile (
                template,
                options
          Severity: Minor
          Found in packages/weex-template-compiler/build.js - About 4 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 processSlotContent has 103 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function processSlotContent (el) {
            var slotScope;
            if (el.tag === 'template') {
              slotScope = getAndRemoveAttr(el, 'scope');
              /* istanbul ignore if */
          Severity: Major
          Found in packages/weex-template-compiler/build.js - About 4 hrs to fix

            Function genElement has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
            Open

            function genElement (el, state) {
              if (el.parent) {
                el.pre = el.pre || el.parent.pre;
              }
            
            
            Severity: Minor
            Found in packages/weex-template-compiler/build.js - About 4 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 defineReactive$$1 has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
            Open

            function defineReactive$$1 (
              obj,
              key,
              val,
              customSetter,
            Severity: Minor
            Found in packages/weex-template-compiler/build.js - About 4 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 generateCodeFrame has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
            Open

            function generateCodeFrame (
              source,
              start,
              end
            ) {
            Severity: Minor
            Found in packages/weex-template-compiler/build.js - About 3 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 checkNode has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
            Open

            function checkNode (node, warn$$1) {
              if (node.type === 1) {
                for (var name in node.attrsMap) {
                  if (dirRE.test(name)) {
                    var value = node.attrsMap[name];
            Severity: Minor
            Found in packages/weex-template-compiler/build.js - About 3 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 addHandler has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
            Open

            function addHandler (
              el,
              name,
              value,
              modifiers,
            Severity: Minor
            Found in packages/weex-template-compiler/build.js - About 3 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 createCompileToFunctionFn has 78 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function createCompileToFunctionFn (compile) {
              var cache = Object.create(null);
            
              return function compileToFunctions (
                template,
            Severity: Major
            Found in packages/weex-template-compiler/build.js - About 3 hrs to fix

              Function mergeDataOrFn has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
              Open

              function mergeDataOrFn (
                parentVal,
                childVal,
                vm
              ) {
              Severity: Minor
              Found in packages/weex-template-compiler/build.js - About 3 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 markStaticRoots has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
              Open

              function markStaticRoots (node, isInFor) {
                if (node.type === 1) {
                  if (node.static || node.once) {
                    node.staticInFor = isInFor;
                  }
              Severity: Minor
              Found in packages/weex-template-compiler/build.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 genData has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
              Open

              function genData (el, state) {
                var data = '{';
              
                // directives first.
                // directives may mutate the el's other properties before they are generated.
              Severity: Minor
              Found in packages/weex-template-compiler/build.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 parseFilters has 72 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function parseFilters (exp) {
                var inSingle = false;
                var inDouble = false;
                var inTemplateString = false;
                var inRegex = false;
              Severity: Major
              Found in packages/weex-template-compiler/build.js - About 2 hrs to fix

                Function compileToFunctions has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  return function compileToFunctions (
                    template,
                    options,
                    vm
                  ) {
                Severity: Major
                Found in packages/weex-template-compiler/build.js - About 2 hrs to fix

                  Function start has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      start: function start (tag, attrs, unary, start$1, end) {
                        // check namespace.
                        // inherit parent ns if there is one
                        var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
                  
                  
                  Severity: Major
                  Found in packages/weex-template-compiler/build.js - About 2 hrs to fix

                    Function markStatic has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function markStatic (node) {
                      node.static = isStatic(node);
                      if (node.type === 1) {
                        // do not make component slot content static. this avoids
                        // 1. components not able to mutate slot nodes
                    Severity: Minor
                    Found in packages/weex-template-compiler/build.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 genDirectives has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function genDirectives (el, state) {
                      var dirs = el.directives;
                      if (!dirs) { return }
                      var res = 'directives:[';
                      var hasRuntime = false;
                    Severity: Minor
                    Found in packages/weex-template-compiler/build.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 chars has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        chars: function chars (text, start, end) {
                          if (!currentParent) {
                            if (process.env.NODE_ENV !== 'production') {
                              if (text === template) {
                                warnOnce(
                    Severity: Major
                    Found in packages/weex-template-compiler/build.js - About 2 hrs to fix

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

                      function genData (el, state) {
                        var data = '{';
                      
                        // directives first.
                        // directives may mutate the el's other properties before they are generated.
                      Severity: Major
                      Found in packages/weex-template-compiler/build.js - About 2 hrs to fix

                        Function genHandler has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function genHandler (handler) {
                          if (!handler) {
                            return 'function(){}'
                          }
                        
                        
                        Severity: Major
                        Found in packages/weex-template-compiler/build.js - About 2 hrs to fix

                          Function addHandler has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function addHandler (
                            el,
                            name,
                            value,
                            modifiers,
                          Severity: Major
                          Found in packages/weex-template-compiler/build.js - About 2 hrs to fix

                            Function createCompilerCreator has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function createCompilerCreator (baseCompile) {
                              return function createCompiler (baseOptions) {
                                function compile (
                                  template,
                                  options
                            Severity: Major
                            Found in packages/weex-template-compiler/build.js - About 2 hrs to fix

                              Function createCompiler has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                return function createCompiler (baseOptions) {
                                  function compile (
                                    template,
                                    options
                                  ) {
                              Severity: Major
                              Found in packages/weex-template-compiler/build.js - About 2 hrs to fix

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

                                function preTransformVIf (el, options) {
                                  if (hasConditionDirective(el)) {
                                    var exp;
                                    var ifExp = getAndRemoveAttr(el, 'v-if', true /* remove from attrsMap */);
                                    var elseifExp = getAndRemoveAttr(el, 'v-else-if', true);
                                Severity: Minor
                                Found in packages/weex-template-compiler/build.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 genChildren has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function genChildren (
                                  el,
                                  state,
                                  checkSkip,
                                  altGenElement,
                                Severity: Minor
                                Found in packages/weex-template-compiler/build.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 genScopedSlots has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function genScopedSlots (
                                  el,
                                  slots,
                                  state
                                ) {
                                Severity: Minor
                                Found in packages/weex-template-compiler/build.js - About 1 hr 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 watch has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                                Open

                                strats.watch = function (
                                  parentVal,
                                  childVal,
                                  vm,
                                  key
                                Severity: Minor
                                Found in packages/weex-template-compiler/build.js - About 1 hr 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 getPreviousConditions has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function getPreviousConditions (el) {
                                  var conditions = [];
                                  if (el.parent && el.parent.children) {
                                    for (var c = 0, n = el.parent.children.length; c < n; ++c) {
                                      // $flow-disable-line
                                Severity: Minor
                                Found in packages/weex-template-compiler/build.js - About 1 hr 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 closeElement has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  function closeElement (element) {
                                    trimEndingWhitespace(element);
                                    if (!inVPre && !element.processed) {
                                      element = processElement(element, options);
                                    }
                                Severity: Minor
                                Found in packages/weex-template-compiler/build.js - About 1 hr to fix

                                  Function defineReactive$$1 has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function defineReactive$$1 (
                                    obj,
                                    key,
                                    val,
                                    customSetter,
                                  Severity: Minor
                                  Found in packages/weex-template-compiler/build.js - About 1 hr to fix

                                    Function compile has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function compile (
                                          template,
                                          options
                                        ) {
                                          var finalOptions = Object.create(baseOptions);
                                    Severity: Minor
                                    Found in packages/weex-template-compiler/build.js - About 1 hr to fix

                                      Function processKey has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      function processKey (el) {
                                        var exp = getBindingAttr(el, 'key');
                                        if (exp) {
                                          if (process.env.NODE_ENV !== 'production') {
                                            if (el.tag === 'template') {
                                      Severity: Minor
                                      Found in packages/weex-template-compiler/build.js - About 1 hr 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 parseEndTag has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        function parseEndTag (tagName, start, end) {
                                          var pos, lowerCasedTagName;
                                          if (start == null) { start = index; }
                                          if (end == null) { end = index; }
                                      
                                      
                                      Severity: Minor
                                      Found in packages/weex-template-compiler/build.js - About 1 hr to fix

                                        Function handleStartTag has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          function handleStartTag (match) {
                                            var tagName = match.tagName;
                                            var unarySlash = match.unarySlash;
                                        
                                            if (expectHTML) {
                                        Severity: Minor
                                        Found in packages/weex-template-compiler/build.js - About 1 hr to fix

                                          Function genElement has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                          function genElement (el, state) {
                                            if (el.parent) {
                                              el.pre = el.pre || el.parent.pre;
                                            }
                                          
                                          
                                          Severity: Minor
                                          Found in packages/weex-template-compiler/build.js - About 1 hr to fix

                                            Function parseStaticStyle has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                            function parseStaticStyle (staticStyle, options) {
                                              // "width: 200px; height: 200px;" -> {width: 200, height: 200}
                                              // "width: 200px; height: {{y}}" -> {width: 200, height: y}
                                              var dynamic = false;
                                              var styleResult = '';
                                            Severity: Minor
                                            Found in packages/weex-template-compiler/build.js - About 1 hr 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 genScopedSlots has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                            function genScopedSlots (
                                              el,
                                              slots,
                                              state
                                            ) {
                                            Severity: Minor
                                            Found in packages/weex-template-compiler/build.js - About 1 hr to fix

                                              Function parseModel has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                              function parseModel (val) {
                                                // Fix https://github.com/vuejs/vue/pull/7730
                                                // allow v-model="obj.val " (trailing whitespace)
                                                val = val.trim();
                                                len = val.length;
                                              Severity: Minor
                                              Found in packages/weex-template-compiler/build.js - About 1 hr to fix

                                                Function set has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                function set (target, key, val) {
                                                  if (process.env.NODE_ENV !== 'production' &&
                                                    (isUndef(target) || isPrimitive(target))
                                                  ) {
                                                    warn$1(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
                                                Severity: Minor
                                                Found in packages/weex-template-compiler/build.js - About 1 hr to fix

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

                                                  function generateCodeFrame (
                                                    source,
                                                    start,
                                                    end
                                                  ) {
                                                  Severity: Minor
                                                  Found in packages/weex-template-compiler/build.js - About 1 hr to fix

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

                                                    function mergeDataOrFn (
                                                      parentVal,
                                                      childVal,
                                                      vm
                                                    ) {
                                                    Severity: Minor
                                                    Found in packages/weex-template-compiler/build.js - About 1 hr to fix

                                                      Function genOnce has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                      Open

                                                      function genOnce (el, state) {
                                                        el.onceProcessed = true;
                                                        if (el.if && !el.ifProcessed) {
                                                          return genIf(el, state)
                                                        } else if (el.staticInFor) {
                                                      Severity: Minor
                                                      Found in packages/weex-template-compiler/build.js - About 1 hr 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 getNormalizationType has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                      Open

                                                      function getNormalizationType (
                                                        children,
                                                        maybeComponent
                                                      ) {
                                                        var res = 0;
                                                      Severity: Minor
                                                      Found in packages/weex-template-compiler/build.js - About 1 hr 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 genIfConditions has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                      Open

                                                      function genIfConditions (
                                                        conditions,
                                                        state,
                                                        altGen,
                                                        altEmpty
                                                      Severity: Minor
                                                      Found in packages/weex-template-compiler/build.js - About 1 hr 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 nodeToBinding has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                      function nodeToBinding (node) {
                                                        switch (node.type) {
                                                          case 'Literal': return node.value
                                                          case 'Identifier':
                                                          case 'UnaryExpression':
                                                      Severity: Minor
                                                      Found in packages/weex-template-compiler/build.js - About 1 hr to fix

                                                        Function parseText has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                        function parseText (
                                                          text,
                                                          delimiters
                                                        ) {
                                                          var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
                                                        Severity: Minor
                                                        Found in packages/weex-template-compiler/build.js - About 1 hr to fix

                                                          Function preTransformRecycleList has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                          function preTransformRecycleList (
                                                            el,
                                                            options
                                                          ) {
                                                            var exp = getAndRemoveAttr(el, 'for');
                                                          Severity: Minor
                                                          Found in packages/weex-template-compiler/build.js - About 1 hr to fix

                                                            Function checkNode has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                            function checkNode (node, warn$$1) {
                                                              if (node.type === 1) {
                                                                for (var name in node.attrsMap) {
                                                                  if (dirRE.test(name)) {
                                                                    var value = node.attrsMap[name];
                                                            Severity: Minor
                                                            Found in packages/weex-template-compiler/build.js - About 1 hr to fix

                                                              Function markStatic has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                              function markStatic (node) {
                                                                node.static = isStatic(node);
                                                                if (node.type === 1) {
                                                                  // do not make component slot content static. this avoids
                                                                  // 1. components not able to mutate slot nodes
                                                              Severity: Minor
                                                              Found in packages/weex-template-compiler/build.js - About 1 hr to fix

                                                                Function addHandler has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                Open

                                                                  el,
                                                                  name,
                                                                  value,
                                                                  modifiers,
                                                                  important,
                                                                Severity: Major
                                                                Found in packages/weex-template-compiler/build.js - About 1 hr to fix

                                                                  Function VNode has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                  Open

                                                                    tag,
                                                                    data,
                                                                    children,
                                                                    text,
                                                                    elm,
                                                                  Severity: Major
                                                                  Found in packages/weex-template-compiler/build.js - About 1 hr to fix

                                                                    Function addDirective has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                    Open

                                                                      el,
                                                                      name,
                                                                      rawName,
                                                                      value,
                                                                      arg,
                                                                    Severity: Major
                                                                    Found in packages/weex-template-compiler/build.js - About 1 hr to fix

                                                                      Function parseBracket has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                                      Open

                                                                      function parseBracket (chr) {
                                                                        var inBracket = 1;
                                                                        expressionPos = index;
                                                                        while (!eof()) {
                                                                          chr = next();
                                                                      Severity: Minor
                                                                      Found in packages/weex-template-compiler/build.js - About 55 mins 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 set has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                                      Open

                                                                      function set (target, key, val) {
                                                                        if (process.env.NODE_ENV !== 'production' &&
                                                                          (isUndef(target) || isPrimitive(target))
                                                                        ) {
                                                                          warn$1(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
                                                                      Severity: Minor
                                                                      Found in packages/weex-template-compiler/build.js - About 55 mins 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 repeat$1 has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                                      Open

                                                                      function repeat$1 (str, n) {
                                                                        var result = '';
                                                                        if (n > 0) {
                                                                          while (true) { // eslint-disable-line
                                                                            if (n & 1) { result += str; }
                                                                      Severity: Minor
                                                                      Found in packages/weex-template-compiler/build.js - About 55 mins 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 mergeData has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                                      Open

                                                                      function mergeData (to, from) {
                                                                        if (!from) { return to }
                                                                        var key, toVal, fromVal;
                                                                      
                                                                        var keys = hasSymbol
                                                                      Severity: Minor
                                                                      Found in packages/weex-template-compiler/build.js - About 55 mins 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 genSlot has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                                      Open

                                                                      function genSlot (el, state) {
                                                                        var slotName = el.slotName || '"default"';
                                                                        var children = genChildren(el, state);
                                                                        var res = "_t(" + slotName + (children ? ("," + children) : '');
                                                                        var attrs = el.attrs || el.dynamicAttrs
                                                                      Severity: Minor
                                                                      Found in packages/weex-template-compiler/build.js - About 55 mins 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 preTransformRecycleList has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                                      Open

                                                                      function preTransformRecycleList (
                                                                        el,
                                                                        options
                                                                      ) {
                                                                        var exp = getAndRemoveAttr(el, 'for');
                                                                      Severity: Minor
                                                                      Found in packages/weex-template-compiler/build.js - About 55 mins 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 parseModel has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                      Open

                                                                      function parseModel (val) {
                                                                        // Fix https://github.com/vuejs/vue/pull/7730
                                                                        // allow v-model="obj.val " (trailing whitespace)
                                                                        val = val.trim();
                                                                        len = val.length;
                                                                      Severity: Minor
                                                                      Found in packages/weex-template-compiler/build.js - About 45 mins 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

                                                                      Avoid deeply nested control flow statements.
                                                                      Open

                                                                              if (arg) {
                                                                                name = name.slice(0, -(arg.length + 1));
                                                                                if (dynamicArgRE.test(arg)) {
                                                                                  arg = arg.slice(1, -1);
                                                                                  isDynamic = true;
                                                                      Severity: Major
                                                                      Found in packages/weex-template-compiler/build.js - About 45 mins to fix

                                                                        Avoid deeply nested control flow statements.
                                                                        Open

                                                                                  if (modifiers.prop && !isDynamic) {
                                                                                    name = camelize(name);
                                                                                    if (name === 'innerHtml') { name = 'innerHTML'; }
                                                                                  }
                                                                        Severity: Major
                                                                        Found in packages/weex-template-compiler/build.js - About 45 mins to fix

                                                                          Function repeat has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                          Open

                                                                            var repeat = function (str, n) {
                                                                              var res = '';
                                                                              while (n) {
                                                                                if (n % 2 === 1) { res += str; }
                                                                                if (n > 1) { str += str; }
                                                                          Severity: Minor
                                                                          Found in packages/weex-template-compiler/build.js - About 45 mins 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

                                                                          Avoid deeply nested control flow statements.
                                                                          Open

                                                                                  if (process.env.NODE_ENV !== 'production' && name === 'model') {
                                                                                    checkForAliasModel(el, value);
                                                                                  }
                                                                          Severity: Major
                                                                          Found in packages/weex-template-compiler/build.js - About 45 mins to fix

                                                                            Avoid deeply nested control flow statements.
                                                                            Open

                                                                                      if (name === 'v-for') {
                                                                                        checkFor(node, ("v-for=\"" + value + "\""), warn$$1, range);
                                                                                      } else if (name === 'v-slot' || name[0] === '#') {
                                                                                        checkFunctionParameterExpression(value, (name + "=\"" + value + "\""), warn$$1, range);
                                                                                      } else if (onRE.test(name)) {
                                                                            Severity: Major
                                                                            Found in packages/weex-template-compiler/build.js - About 45 mins to fix

                                                                              Function observe has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                              Open

                                                                              function observe (value, asRootData) {
                                                                                if (!isObject(value) || value instanceof VNode) {
                                                                                  return
                                                                                }
                                                                                var ob;
                                                                              Severity: Minor
                                                                              Found in packages/weex-template-compiler/build.js - About 45 mins 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

                                                                              Avoid deeply nested control flow statements.
                                                                              Open

                                                                                    if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; }
                                                                              Severity: Major
                                                                              Found in packages/weex-template-compiler/build.js - About 45 mins to fix

                                                                                Avoid deeply nested control flow statements.
                                                                                Open

                                                                                    } else if (inRegex) {
                                                                                      if (c === 0x2f && prev !== 0x5C) { inRegex = false; }
                                                                                    } else if (
                                                                                      c === 0x7C && // pipe
                                                                                      exp.charCodeAt(i + 1) !== 0x7C &&
                                                                                Severity: Major
                                                                                Found in packages/weex-template-compiler/build.js - About 45 mins to fix

                                                                                  Avoid deeply nested control flow statements.
                                                                                  Open

                                                                                            if (modifiers.camel && !isDynamic) {
                                                                                              name = camelize(name);
                                                                                            }
                                                                                  Severity: Major
                                                                                  Found in packages/weex-template-compiler/build.js - About 45 mins to fix

                                                                                    Avoid deeply nested control flow statements.
                                                                                    Open

                                                                                              if (next < 0) { break }
                                                                                    Severity: Major
                                                                                    Found in packages/weex-template-compiler/build.js - About 45 mins to fix

                                                                                      Avoid deeply nested control flow statements.
                                                                                      Open

                                                                                                if (last.constructor === vm.constructor) {
                                                                                                  currentRecursiveSequence++;
                                                                                                  vm = vm.$parent;
                                                                                                  continue
                                                                                                } else if (currentRecursiveSequence > 0) {
                                                                                      Severity: Major
                                                                                      Found in packages/weex-template-compiler/build.js - About 45 mins to fix

                                                                                        Avoid deeply nested control flow statements.
                                                                                        Open

                                                                                                if (isDynamic) {
                                                                                                  name = name.slice(1, -1);
                                                                                                }
                                                                                        Severity: Major
                                                                                        Found in packages/weex-template-compiler/build.js - About 45 mins to fix

                                                                                          Avoid deeply nested control flow statements.
                                                                                          Open

                                                                                                    if (conditionalEnd >= 0) {
                                                                                                      advance(conditionalEnd + 2);
                                                                                                      continue
                                                                                                    }
                                                                                          Severity: Major
                                                                                          Found in packages/weex-template-compiler/build.js - About 45 mins to fix

                                                                                            Avoid deeply nested control flow statements.
                                                                                            Open

                                                                                                      if (shouldIgnoreFirstNewline(startTagMatch.tagName, html)) {
                                                                                                        advance(1);
                                                                                                      }
                                                                                            Severity: Major
                                                                                            Found in packages/weex-template-compiler/build.js - About 45 mins to fix

                                                                                              Avoid deeply nested control flow statements.
                                                                                              Open

                                                                                                        if (end > count) {
                                                                                                          var length$1 = Math.min(end - count, lineLength);
                                                                                                          res.push("   |  " + repeat$1("^", length$1));
                                                                                                        }
                                                                                              Severity: Major
                                                                                              Found in packages/weex-template-compiler/build.js - About 45 mins to fix

                                                                                                Avoid deeply nested control flow statements.
                                                                                                Open

                                                                                                          if (modifiers.sync) {
                                                                                                            syncGen = genAssignmentCode(value, "$event");
                                                                                                            if (!isDynamic) {
                                                                                                              addHandler(
                                                                                                                el,
                                                                                                Severity: Major
                                                                                                Found in packages/weex-template-compiler/build.js - About 45 mins to fix

                                                                                                  Function genScopedSlot has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                                                  Open

                                                                                                  function genScopedSlot (
                                                                                                    el,
                                                                                                    state
                                                                                                  ) {
                                                                                                    var isLegacySyntax = el.attrsMap['slot-scope'];
                                                                                                  Severity: Minor
                                                                                                  Found in packages/weex-template-compiler/build.js - About 45 mins 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

                                                                                                  Avoid deeply nested control flow statements.
                                                                                                  Open

                                                                                                            if (commentEnd >= 0) {
                                                                                                              if (options.shouldKeepComment) {
                                                                                                                options.comment(html.substring(4, commentEnd), index, index + commentEnd + 3);
                                                                                                              }
                                                                                                              advance(commentEnd + 3);
                                                                                                  Severity: Major
                                                                                                  Found in packages/weex-template-compiler/build.js - About 45 mins to fix

                                                                                                    Avoid deeply nested control flow statements.
                                                                                                    Open

                                                                                                              if (condition && condition.exp) {
                                                                                                                conditions.push(condition.exp);
                                                                                                              }
                                                                                                    Severity: Major
                                                                                                    Found in packages/weex-template-compiler/build.js - About 45 mins to fix

                                                                                                      Consider simplifying this complex logical expression.
                                                                                                      Open

                                                                                                        } else if (
                                                                                                          shouldObserve &&
                                                                                                          !isServerRendering() &&
                                                                                                          (Array.isArray(value) || isPlainObject(value)) &&
                                                                                                          Object.isExtensible(value) &&
                                                                                                      Severity: Major
                                                                                                      Found in packages/weex-template-compiler/build.js - About 40 mins to fix

                                                                                                        Consider simplifying this complex logical expression.
                                                                                                        Open

                                                                                                            } else if (
                                                                                                              c === 0x7C && // pipe
                                                                                                              exp.charCodeAt(i + 1) !== 0x7C &&
                                                                                                              exp.charCodeAt(i - 1) !== 0x7C &&
                                                                                                              !curly && !square && !paren
                                                                                                        Severity: Major
                                                                                                        Found in packages/weex-template-compiler/build.js - About 40 mins to fix

                                                                                                          Function genChildren has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                          Open

                                                                                                            el,
                                                                                                            state,
                                                                                                            checkSkip,
                                                                                                            altGenElement,
                                                                                                            altGenNode
                                                                                                          Severity: Minor
                                                                                                          Found in packages/weex-template-compiler/build.js - About 35 mins to fix

                                                                                                            Function addAttr has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                            Open

                                                                                                            function addAttr (el, name, value, range, dynamic) {
                                                                                                            Severity: Minor
                                                                                                            Found in packages/weex-template-compiler/build.js - About 35 mins to fix

                                                                                                              Function addProp has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                              Open

                                                                                                              function addProp (el, name, value, range, dynamic) {
                                                                                                              Severity: Minor
                                                                                                              Found in packages/weex-template-compiler/build.js - About 35 mins to fix

                                                                                                                Function defineReactive$$1 has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                Open

                                                                                                                  obj,
                                                                                                                  key,
                                                                                                                  val,
                                                                                                                  customSetter,
                                                                                                                  shallow
                                                                                                                Severity: Minor
                                                                                                                Found in packages/weex-template-compiler/build.js - About 35 mins to fix

                                                                                                                  Function start has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                  Open

                                                                                                                      start: function start (tag, attrs, unary, start$1, end) {
                                                                                                                  Severity: Minor
                                                                                                                  Found in packages/weex-template-compiler/build.js - About 35 mins to fix

                                                                                                                    Function checkIdentifier has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                      ident,
                                                                                                                      type,
                                                                                                                      text,
                                                                                                                      warn$$1,
                                                                                                                      range
                                                                                                                    Severity: Minor
                                                                                                                    Found in packages/weex-template-compiler/build.js - About 35 mins to fix

                                                                                                                      Function getAndRemoveAttr has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                                                                      Open

                                                                                                                      function getAndRemoveAttr (
                                                                                                                        el,
                                                                                                                        name,
                                                                                                                        removeFromMap
                                                                                                                      ) {
                                                                                                                      Severity: Minor
                                                                                                                      Found in packages/weex-template-compiler/build.js - About 35 mins 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 processRawAttrs has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                                                                      Open

                                                                                                                      function processRawAttrs (el) {
                                                                                                                        var list = el.attrsList;
                                                                                                                        var len = list.length;
                                                                                                                        if (len) {
                                                                                                                          var attrs = el.attrs = new Array(len);
                                                                                                                      Severity: Minor
                                                                                                                      Found in packages/weex-template-compiler/build.js - About 35 mins 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 findPrevElement has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                                                                      Open

                                                                                                                      function findPrevElement (children) {
                                                                                                                        var i = children.length;
                                                                                                                        while (i--) {
                                                                                                                          if (children[i].type === 1) {
                                                                                                                            return children[i]
                                                                                                                      Severity: Minor
                                                                                                                      Found in packages/weex-template-compiler/build.js - About 35 mins 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 genHandlers has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                                                                      Open

                                                                                                                      function genHandlers (
                                                                                                                        events,
                                                                                                                        isNative
                                                                                                                      ) {
                                                                                                                        var prefix = isNative ? 'nativeOn:' : 'on:';
                                                                                                                      Severity: Minor
                                                                                                                      Found in packages/weex-template-compiler/build.js - About 35 mins 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 mergeHook has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                                                                      Open

                                                                                                                      function mergeHook (
                                                                                                                        parentVal,
                                                                                                                        childVal
                                                                                                                      ) {
                                                                                                                        var res = childVal
                                                                                                                      Severity: Minor
                                                                                                                      Found in packages/weex-template-compiler/build.js - About 35 mins 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

                                                                                                                      Avoid too many return statements within this function.
                                                                                                                      Open

                                                                                                                          return genSlot(el, state)
                                                                                                                      Severity: Major
                                                                                                                      Found in packages/weex-template-compiler/build.js - About 30 mins to fix

                                                                                                                        Avoid too many return statements within this function.
                                                                                                                        Open

                                                                                                                              return genWeexHandler(handler.params, code + handlerCode)
                                                                                                                        Severity: Major
                                                                                                                        Found in packages/weex-template-compiler/build.js - About 30 mins to fix

                                                                                                                          Avoid too many return statements within this function.
                                                                                                                          Open

                                                                                                                            return val
                                                                                                                          Severity: Major
                                                                                                                          Found in packages/weex-template-compiler/build.js - About 30 mins to fix

                                                                                                                            Avoid too many return statements within this function.
                                                                                                                            Open

                                                                                                                                return genChildren(el, state) || 'void 0'
                                                                                                                            Severity: Major
                                                                                                                            Found in packages/weex-template-compiler/build.js - About 30 mins to fix

                                                                                                                              Avoid too many return statements within this function.
                                                                                                                              Open

                                                                                                                                  return ("function($event){" + code + handlerCode + "}")
                                                                                                                              Severity: Major
                                                                                                                              Found in packages/weex-template-compiler/build.js - About 30 mins to fix

                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                Open

                                                                                                                                    return ("function($event){" + (isFunctionInvocation ? ("return " + (handler.value)) : handler.value) + "}") // inline statement
                                                                                                                                Severity: Major
                                                                                                                                Found in packages/weex-template-compiler/build.js - About 30 mins to fix

                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                  Open

                                                                                                                                      return code
                                                                                                                                  Severity: Major
                                                                                                                                  Found in packages/weex-template-compiler/build.js - About 30 mins to fix

                                                                                                                                    Function parseText has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                    function parseText (
                                                                                                                                      text,
                                                                                                                                      delimiters
                                                                                                                                    ) {
                                                                                                                                      var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in packages/weex-template-compiler/build.js - About 25 mins 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 preTransformVFor has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                    function preTransformVFor (el, options) {
                                                                                                                                      var exp = getAndRemoveAttr(el, 'v-for');
                                                                                                                                      if (!exp) {
                                                                                                                                        return
                                                                                                                                      }
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in packages/weex-template-compiler/build.js - About 25 mins 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 processIf has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                    function processIf (el) {
                                                                                                                                      var exp = getAndRemoveAttr(el, 'v-if');
                                                                                                                                      if (exp) {
                                                                                                                                        el.if = exp;
                                                                                                                                        addIfCondition(el, {
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in packages/weex-template-compiler/build.js - About 25 mins 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 parseStaticClass has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                    function parseStaticClass (staticClass, options) {
                                                                                                                                      // "a b c" -> ["a", "b", "c"] => staticClass: ["a", "b", "c"]
                                                                                                                                      // "a {{x}} c" -> ["a", x, "c"] => classBinding: '["a", x, "c"]'
                                                                                                                                      var dynamic = false;
                                                                                                                                      var classResult = '';
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in packages/weex-template-compiler/build.js - About 25 mins 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 genText$1 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                    function genText$1 (node) {
                                                                                                                                      var value = node.type === 3
                                                                                                                                        ? node.text
                                                                                                                                        : node.type === 2
                                                                                                                                          ? node.tokens.length === 1
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in packages/weex-template-compiler/build.js - About 25 mins 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 processIfConditions has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                    function processIfConditions (el, parent) {
                                                                                                                                      var prev = findPrevElement(parent.children);
                                                                                                                                      if (prev && prev.if) {
                                                                                                                                        addIfCondition(prev, {
                                                                                                                                          exp: el.elseif,
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in packages/weex-template-compiler/build.js - About 25 mins 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 genProps has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                    function genProps (props) {
                                                                                                                                      var staticProps = "";
                                                                                                                                      var dynamicProps = "";
                                                                                                                                      for (var i = 0; i < props.length; i++) {
                                                                                                                                        var prop = props[i];
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in packages/weex-template-compiler/build.js - About 25 mins 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 transformNode$1 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                    function transformNode$1 (el, options) {
                                                                                                                                      var warn = options.warn || baseWarn;
                                                                                                                                      var staticStyle = getAndRemoveAttr(el, 'style');
                                                                                                                                      var ref = parseStaticStyle(staticStyle, options);
                                                                                                                                      var dynamic = ref.dynamic;
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in packages/weex-template-compiler/build.js - About 25 mins 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 transformNode has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                    function transformNode (el, options) {
                                                                                                                                      var warn = options.warn || baseWarn;
                                                                                                                                      var staticClass = getAndRemoveAttr(el, 'class');
                                                                                                                                      var ref = parseStaticClass(staticClass, options);
                                                                                                                                      var dynamic = ref.dynamic;
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in packages/weex-template-compiler/build.js - About 25 mins 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

                                                                                                                                    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

                                                                                                                                      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

                                                                                                                                    function processAttrs (el) {
                                                                                                                                      var list = el.attrsList;
                                                                                                                                      var i, l, name, rawName, value, modifiers, syncGen, isDynamic;
                                                                                                                                      for (i = 0, l = list.length; i < l; i++) {
                                                                                                                                        name = rawName = list[i].name;
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 6 days to fix
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3085..3217

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

                                                                                                                                    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 processSlotContent (el) {
                                                                                                                                      var slotScope;
                                                                                                                                      if (el.tag === 'template') {
                                                                                                                                        slotScope = getAndRemoveAttr(el, 'scope');
                                                                                                                                        /* istanbul ignore if */
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 5 days to fix
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2922..3039

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

                                                                                                                                    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 (process.env.NODE_ENV !== 'production') {
                                                                                                                                      var hasConsole = typeof console !== 'undefined';
                                                                                                                                      var classifyRE = /(?:^|[-_])(\w)/g;
                                                                                                                                      var classify = function (str) { return str
                                                                                                                                        .replace(classifyRE, function (c) { return c.toUpperCase(); })
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 4 days to fix
                                                                                                                                    packages/vue-template-compiler/build.js on lines 901..984

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

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

                                                                                                                                    function parseFilters (exp) {
                                                                                                                                      var inSingle = false;
                                                                                                                                      var inDouble = false;
                                                                                                                                      var inTemplateString = false;
                                                                                                                                      var inRegex = false;
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 4 days to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 2572..2652
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 2667..2747
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1762..1842
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1727..1807

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

                                                                                                                                    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 createCompileToFunctionFn (compile) {
                                                                                                                                      var cache = Object.create(null);
                                                                                                                                    
                                                                                                                                      return function compileToFunctions (
                                                                                                                                        template,
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 4 days to fix
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4650..4748

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

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

                                                                                                                                    function genData (el, state) {
                                                                                                                                      var data = '{';
                                                                                                                                    
                                                                                                                                      // directives first.
                                                                                                                                      // directives may mutate the el's other properties before they are generated.
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 4 days to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5423..5505
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 5173..5255
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4460..4542
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4091..4173

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

                                                                                                                                    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 addHandler (
                                                                                                                                      el,
                                                                                                                                      name,
                                                                                                                                      value,
                                                                                                                                      modifiers,
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 3 days to fix
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1934..2015

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

                                                                                                                                    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 createCompilerCreator (baseCompile) {
                                                                                                                                      return function createCompiler (baseOptions) {
                                                                                                                                        function compile (
                                                                                                                                          template,
                                                                                                                                          options
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 3 days to fix
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4752..4820

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

                                                                                                                                    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 closeElement (element) {
                                                                                                                                        trimEndingWhitespace(element);
                                                                                                                                        if (!inVPre && !element.processed) {
                                                                                                                                          element = processElement(element, options);
                                                                                                                                        }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 2 days to fix
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2441..2499

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

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

                                                                                                                                    function genElement (el, state) {
                                                                                                                                      if (el.parent) {
                                                                                                                                        el.pre = el.pre || el.parent.pre;
                                                                                                                                      }
                                                                                                                                    
                                                                                                                                    
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 2 days to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5272..5309
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 5022..5059
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4309..4346
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3939..3976

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

                                                                                                                                    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 defineReactive$$1 (
                                                                                                                                      obj,
                                                                                                                                      key,
                                                                                                                                      val,
                                                                                                                                      customSetter,
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 2 other locations - About 2 days to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 996..1055
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1234..1293

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

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

                                                                                                                                    function generateCodeFrame (
                                                                                                                                      source,
                                                                                                                                      start,
                                                                                                                                      end
                                                                                                                                    ) {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 2 days to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 6388..6423
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 6138..6173
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4954..4989
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4587..4622

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

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

                                                                                                                                    function genDirectives (el, state) {
                                                                                                                                      var dirs = el.directives;
                                                                                                                                      if (!dirs) { return }
                                                                                                                                      var res = 'directives:[';
                                                                                                                                      var hasRuntime = false;
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 day to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5507..5530
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 5257..5280
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4544..4567
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4175..4198

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

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

                                                                                                                                    function parseText (
                                                                                                                                      text,
                                                                                                                                      delimiters
                                                                                                                                    ) {
                                                                                                                                      var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 day to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 2679..2712
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 2774..2807
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1869..1902
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1834..1867

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

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

                                                                                                                                    function genScopedSlots (
                                                                                                                                      el,
                                                                                                                                      slots,
                                                                                                                                      state
                                                                                                                                    ) {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 day to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5546..5598
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 5296..5348
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4583..4635
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4216..4268

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

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

                                                                                                                                    function checkNode (node, warn$$1) {
                                                                                                                                      if (node.type === 1) {
                                                                                                                                        for (var name in node.attrsMap) {
                                                                                                                                          if (dirRE.test(name)) {
                                                                                                                                            var value = node.attrsMap[name];
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 day to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 6284..6311
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 6034..6061
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4850..4877
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4483..4510

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

                                                                                                                                    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 markStaticRoots (node, isInFor) {
                                                                                                                                      if (node.type === 1) {
                                                                                                                                        if (node.static || node.once) {
                                                                                                                                          node.staticInFor = isInFor;
                                                                                                                                        }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 2 other locations - About 1 day to fix
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4027..4055
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3657..3685

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

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

                                                                                                                                    function parseModel (val) {
                                                                                                                                      // Fix https://github.com/vuejs/vue/pull/7730
                                                                                                                                      // allow v-model="obj.val " (trailing whitespace)
                                                                                                                                      val = val.trim();
                                                                                                                                      len = val.length;
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 day to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 3739..3777
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 3489..3527
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 2649..2687
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2269..2307

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

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

                                                                                                                                    var VNode = function VNode (
                                                                                                                                      tag,
                                                                                                                                      data,
                                                                                                                                      children,
                                                                                                                                      text,
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 1 day to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 749..782
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 529..562
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 531..564
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1070..1103
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1034..1067

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

                                                                                                                                    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 genFor (
                                                                                                                                      el,
                                                                                                                                      state,
                                                                                                                                      altGen,
                                                                                                                                      altHelper
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 1 day to fix
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4058..4089

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

                                                                                                                                    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 set (target, key, val) {
                                                                                                                                      if (process.env.NODE_ENV !== 'production' &&
                                                                                                                                        (isUndef(target) || isPrimitive(target))
                                                                                                                                      ) {
                                                                                                                                        warn$1(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 2 other locations - About 1 day to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 1062..1092
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1300..1330

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

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

                                                                                                                                    function markStatic (node) {
                                                                                                                                      node.static = isStatic(node);
                                                                                                                                      if (node.type === 1) {
                                                                                                                                        // do not make component slot content static. this avoids
                                                                                                                                        // 1. components not able to mutate slot nodes
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 2 other locations - About 1 day to fix
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 3995..4025
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3625..3655

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

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

                                                                                                                                    function genScopedSlot (
                                                                                                                                      el,
                                                                                                                                      state
                                                                                                                                    ) {
                                                                                                                                      var isLegacySyntax = el.attrsMap['slot-scope'];
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 day to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5619..5642
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 5369..5392
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4656..4679
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4289..4312

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

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

                                                                                                                                    strats.watch = function (
                                                                                                                                      parentVal,
                                                                                                                                      childVal,
                                                                                                                                      vm,
                                                                                                                                      key
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 2 other locations - About 1 day to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 1325..1353
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1532..1560

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

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

                                                                                                                                    function genChildren (
                                                                                                                                      el,
                                                                                                                                      state,
                                                                                                                                      checkSkip,
                                                                                                                                      altGenElement,
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 day to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5644..5671
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 5394..5421
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4681..4708
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4314..4341

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

                                                                                                                                    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 genOnce (el, state) {
                                                                                                                                      el.onceProcessed = true;
                                                                                                                                      if (el.if && !el.ifProcessed) {
                                                                                                                                        return genIf(el, state)
                                                                                                                                      } else if (el.staticInFor) {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 1 day to fix
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3994..4019

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

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

                                                                                                                                    function processRawAttrs (el) {
                                                                                                                                      var list = el.attrsList;
                                                                                                                                      var len = list.length;
                                                                                                                                      if (len) {
                                                                                                                                        var attrs = el.attrs = new Array(len);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 day to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 4206..4225
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 3956..3975
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 3116..3135
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2736..2755

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

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

                                                                                                                                    function mergeDataOrFn (
                                                                                                                                      parentVal,
                                                                                                                                      childVal,
                                                                                                                                      vm
                                                                                                                                    ) {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 1 day to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 1196..1236
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 1361..1401
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 1363..1403
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1438..1478
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1403..1443

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

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

                                                                                                                                    function parseFor (exp) {
                                                                                                                                      var inMatch = exp.match(forAliasRE);
                                                                                                                                      if (!inMatch) { return }
                                                                                                                                      var res = {};
                                                                                                                                      res.for = inMatch[2].trim();
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 day to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 4304..4321
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 4054..4071
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 3214..3231
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2834..2851

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

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

                                                                                                                                    function mergeData (to, from) {
                                                                                                                                      if (!from) { return to }
                                                                                                                                      var key, toVal, fromVal;
                                                                                                                                    
                                                                                                                                      var keys = hasSymbol
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 1 day to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 1166..1191
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 1331..1356
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 1333..1358
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1408..1433
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1373..1398

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

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

                                                                                                                                    var CodegenState = function CodegenState (options) {
                                                                                                                                      this.options = options;
                                                                                                                                      this.warn = options.warn || baseWarn;
                                                                                                                                      this.transforms = pluckModuleFunction(options.modules, 'transformCode');
                                                                                                                                      this.dataGenFns = pluckModuleFunction(options.modules, 'genData');
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 day to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5244..5255
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 4994..5005
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4281..4292
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3911..3922

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

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

                                                                                                                                    function genComponentModel (
                                                                                                                                      el,
                                                                                                                                      value,
                                                                                                                                      modifiers
                                                                                                                                    ) {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 day to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 3676..3703
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 3426..3453
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 2586..2613
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2206..2233

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

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

                                                                                                                                    methodsToPatch.forEach(function (method) {
                                                                                                                                      // cache original method
                                                                                                                                      var original = arrayProto[method];
                                                                                                                                      def(arrayMethods, method, function mutator () {
                                                                                                                                        var args = [], len = arguments.length;
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 1 day to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 858..882
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 1055..1079
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 1057..1081
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1136..1160
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1100..1124

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

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

                                                                                                                                    function getNormalizationType (
                                                                                                                                      children,
                                                                                                                                      maybeComponent
                                                                                                                                    ) {
                                                                                                                                      var res = 0;
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 day to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5677..5698
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 5427..5448
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4714..4735
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4347..4368

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

                                                                                                                                    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 genInlineTemplate (el, state) {
                                                                                                                                      var ast = el.children[0];
                                                                                                                                      if (process.env.NODE_ENV !== 'production' && (
                                                                                                                                        el.children.length !== 1 || ast.type !== 1
                                                                                                                                      )) {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 7 hrs to fix
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4200..4214

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

                                                                                                                                    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

                                                                                                                                        el.attrsList.forEach(function (attr) {
                                                                                                                                          if (attr.name && attr.name.match(/\-/)) {
                                                                                                                                            var realName = normalizeKeyName(attr.name);
                                                                                                                                            if (el.attrsMap) {
                                                                                                                                              el.attrsMap[realName] = el.attrsMap[attr.name];
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 7 hrs to fix
                                                                                                                                    src/platforms/weex/compiler/modules/props.js on lines 18..32

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

                                                                                                                                    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 getPreviousConditions (el) {
                                                                                                                                      var conditions = [];
                                                                                                                                      if (el.parent && el.parent.children) {
                                                                                                                                        for (var c = 0, n = el.parent.children.length; c < n; ++c) {
                                                                                                                                          // $flow-disable-line
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 7 hrs to fix
                                                                                                                                    src/platforms/weex/compiler/modules/recycle-list/v-if.js on lines 15..32

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

                                                                                                                                    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 processKey (el) {
                                                                                                                                      var exp = getBindingAttr(el, 'key');
                                                                                                                                      if (exp) {
                                                                                                                                        if (process.env.NODE_ENV !== 'production') {
                                                                                                                                          if (el.tag === 'template') {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 7 hrs to fix
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2782..2807

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

                                                                                                                                    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 config = ({
                                                                                                                                      /**
                                                                                                                                       * Option merge strategies (used in core/util/options)
                                                                                                                                       */
                                                                                                                                      // $flow-disable-line
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 6 hrs to fix
                                                                                                                                    packages/vue-template-compiler/build.js on lines 800..892

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

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

                                                                                                                                    function observe (value, asRootData) {
                                                                                                                                      if (!isObject(value) || value instanceof VNode) {
                                                                                                                                        return
                                                                                                                                      }
                                                                                                                                      var ob;
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 6 hrs to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 971..991
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 1168..1188
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 1170..1190
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1245..1265
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1209..1229

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

                                                                                                                                    function genIfConditions (
                                                                                                                                      conditions,
                                                                                                                                      state,
                                                                                                                                      altGen,
                                                                                                                                      altEmpty
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 6 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5364..5389
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 5114..5139
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4401..4426
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4031..4056

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

                                                                                                                                    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 getSlotName (binding) {
                                                                                                                                      var name = binding.name.replace(slotRE, '');
                                                                                                                                      if (!name) {
                                                                                                                                        if (binding.name[0] !== '#') {
                                                                                                                                          name = 'default';
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 6 hrs to fix
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3041..3058

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

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

                                                                                                                                    Dep.prototype.notify = function notify () {
                                                                                                                                      // stabilize the subscriber list first
                                                                                                                                      var subs = this.subs.slice();
                                                                                                                                      if (process.env.NODE_ENV !== 'production' && !config.async) {
                                                                                                                                        // subs aren't sorted in scheduler if not running async
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 2 other locations - About 6 hrs to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 717..729
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1013..1025

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

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

                                                                                                                                    function checkExpression (exp, text, warn$$1, range) {
                                                                                                                                      try {
                                                                                                                                        new Function(("return " + exp));
                                                                                                                                      } catch (e) {
                                                                                                                                        var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 6 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 6349..6369
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 6099..6119
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4915..4935
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4548..4568

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

                                                                                                                                    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 processIfConditions (el, parent) {
                                                                                                                                      var prev = findPrevElement(parent.children);
                                                                                                                                      if (prev && prev.if) {
                                                                                                                                        addIfCondition(prev, {
                                                                                                                                          exp: el.elseif,
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 6 hrs to fix
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2872..2886

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

                                                                                                                                    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

                                                                                                                                    if (typeof Promise !== 'undefined' && isNative(Promise)) ; else if (!isIE && typeof MutationObserver !== 'undefined' && (
                                                                                                                                      isNative(MutationObserver) ||
                                                                                                                                      // PhantomJS and iOS 7.x
                                                                                                                                      MutationObserver.toString() === '[object MutationObserverConstructor]'
                                                                                                                                    )) {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 2 other locations - About 5 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 2069..2083
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 2071..2085

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

                                                                                                                                    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 isStatic (node) {
                                                                                                                                      if (node.type === 2) { // expression
                                                                                                                                        return false
                                                                                                                                      }
                                                                                                                                      if (node.type === 3) { // text
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 2 other locations - About 5 hrs to fix
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4057..4072
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3687..3702

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

                                                                                                                                    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 makeAttrsMap (attrs) {
                                                                                                                                      var map = {};
                                                                                                                                      for (var i = 0, l = attrs.length; i < l; i++) {
                                                                                                                                        if (
                                                                                                                                          process.env.NODE_ENV !== 'production' &&
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 5 hrs to fix
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3239..3251

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

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

                                                                                                                                    function processElement (
                                                                                                                                      element,
                                                                                                                                      options
                                                                                                                                    ) {
                                                                                                                                      processKey(element);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 5 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 4227..4250
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 3977..4000
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 3137..3160
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2757..2780

                                                                                                                                    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

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

                                                                                                                                    function genStatic (el, state) {
                                                                                                                                      el.staticProcessed = true;
                                                                                                                                      // Some elements (templates) need to behave differently inside of a v-pre
                                                                                                                                      // node.  All pre nodes are static roots, so we can use this as a location to
                                                                                                                                      // wrap a state change and reset it upon exiting the pre node.
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 5 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5312..5324
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 5062..5074
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4349..4361
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3979..3991

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

                                                                                                                                    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 styleList = staticStyle.trim().split(';').map(function (style) {
                                                                                                                                          var result = style.trim().split(':');
                                                                                                                                          if (result.length !== 2) {
                                                                                                                                            return
                                                                                                                                          }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 5 hrs to fix
                                                                                                                                    src/platforms/weex/compiler/modules/style.js on lines 60..73

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

                                                                                                                                    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 findPrevElement (children) {
                                                                                                                                      var i = children.length;
                                                                                                                                      while (i--) {
                                                                                                                                        if (children[i].type === 1) {
                                                                                                                                          return children[i]
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 5 hrs to fix
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2888..2904

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

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

                                                                                                                                    function getAndRemoveAttr (
                                                                                                                                      el,
                                                                                                                                      name,
                                                                                                                                      removeFromMap
                                                                                                                                    ) {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 5 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 2893..2912
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 2988..3007
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 2083..2102
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2048..2067

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

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

                                                                                                                                    var Observer = function Observer (value) {
                                                                                                                                      this.value = value;
                                                                                                                                      this.dep = new Dep();
                                                                                                                                      this.vmCount = 0;
                                                                                                                                      def(value, '__ob__', this);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 4 hrs to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 904..919
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 1101..1116
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 1103..1118
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1178..1193
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1142..1157

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

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

                                                                                                                                    strats.props =
                                                                                                                                    strats.methods =
                                                                                                                                    strats.inject =
                                                                                                                                    strats.computed = function (
                                                                                                                                      parentVal,
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 2 other locations - About 4 hrs to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 1358..1375
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1565..1582

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

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

                                                                                                                                    function wrapFilter (exp, filter) {
                                                                                                                                      var i = filter.indexOf('(');
                                                                                                                                      if (i < 0) {
                                                                                                                                        // _f: resolveFilter
                                                                                                                                        return ("_f(\"" + filter + "\")(" + exp + ")")
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 4 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 2654..2664
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 2749..2759
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1844..1854
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1809..1819

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

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

                                                                                                                                    function makeMap (
                                                                                                                                      str,
                                                                                                                                      expectsLowerCase
                                                                                                                                    ) {
                                                                                                                                      var map = Object.create(null);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 4 hrs to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 112..124
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 108..120
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 110..122
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 114..126
                                                                                                                                    packages/vue-template-compiler/build.js on lines 71..83

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

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

                                                                                                                                    function bind$1 (el, dir) {
                                                                                                                                      el.wrapData = function (code) {
                                                                                                                                        return ("_b(" + code + ",'" + (el.tag) + "'," + (dir.value) + "," + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + ")")
                                                                                                                                      };
                                                                                                                                    }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 4 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5224..5228
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 4974..4978
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4261..4265
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3891..3895

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

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

                                                                                                                                    function processIf (el) {
                                                                                                                                      var exp = getAndRemoveAttr(el, 'v-if');
                                                                                                                                      if (exp) {
                                                                                                                                        el.if = exp;
                                                                                                                                        addIfCondition(el, {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 4 hrs to fix
                                                                                                                                    src/compiler/parser/index.js on lines 534..551
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 4323..4340
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 4073..4090
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 3233..3250
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2853..2870

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

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

                                                                                                                                    function checkEvent (exp, text, warn$$1, range) {
                                                                                                                                      var stripped = exp.replace(stripStringRE, '');
                                                                                                                                      var keywordMatch = stripped.match(unaryOperatorsRE);
                                                                                                                                      if (keywordMatch && stripped.charAt(keywordMatch.index - 1) !== '$') {
                                                                                                                                        warn$$1(
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 4 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 6313..6324
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 6063..6074
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4879..4890
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4512..4523

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

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

                                                                                                                                    function dependArray (value) {
                                                                                                                                      for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
                                                                                                                                        e = value[i];
                                                                                                                                        e && e.__ob__ && e.__ob__.dep.depend();
                                                                                                                                        if (Array.isArray(e)) {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 4 hrs to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 1129..1137
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 1294..1302
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 1296..1304
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1371..1379
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1336..1344

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

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

                                                                                                                                    function guardIESVGBug (attrs) {
                                                                                                                                      var res = [];
                                                                                                                                      for (var i = 0; i < attrs.length; i++) {
                                                                                                                                        var attr = attrs[i];
                                                                                                                                        if (!ieNSBug.test(attr.name)) {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 4 hrs to fix
                                                                                                                                    src/compiler/parser/index.js on lines 952..962
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 4740..4750
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 4490..4500
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 3650..3660
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3272..3282

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

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

                                                                                                                                    function parseBracket (chr) {
                                                                                                                                      var inBracket = 1;
                                                                                                                                      expressionPos = index;
                                                                                                                                      while (!eof()) {
                                                                                                                                        chr = next();
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 4 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 3791..3807
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 3541..3557
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 2701..2717
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2321..2337

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

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

                                                                                                                                    function checkForAliasModel (el, value) {
                                                                                                                                      var _el = el;
                                                                                                                                      while (_el) {
                                                                                                                                        if (_el.for && _el.alias === value) {
                                                                                                                                          warn(
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 3 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 4752..4767
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 4502..4517
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 3662..3677
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3284..3299

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

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

                                                                                                                                    function getBindingAttr (
                                                                                                                                      el,
                                                                                                                                      name,
                                                                                                                                      getStatic
                                                                                                                                    ) {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 3 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 2871..2887
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 2966..2982
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 2061..2077
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2026..2042

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

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

                                                                                                                                    var createCompiler = createCompilerCreator(function baseCompile (
                                                                                                                                      template,
                                                                                                                                      options
                                                                                                                                    ) {
                                                                                                                                      var ast = parse(template.trim(), options);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 2 other locations - About 3 hrs to fix
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 5194..5208
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4827..4841

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

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

                                                                                                                                    function addAttr (el, name, value, range, dynamic) {
                                                                                                                                      var attrs = dynamic
                                                                                                                                        ? (el.dynamicAttrs || (el.dynamicAttrs = []))
                                                                                                                                        : (el.attrs || (el.attrs = []));
                                                                                                                                      attrs.push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 3 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 2738..2744
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 2833..2839
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1928..1934
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1893..1899

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

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

                                                                                                                                    var isServerRendering = function () {
                                                                                                                                      if (_isServer === undefined) {
                                                                                                                                        /* istanbul ignore if */
                                                                                                                                        if (!inBrowser && !inWeex && typeof global !== 'undefined') {
                                                                                                                                          // detect presence of vue-server-renderer and avoid
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 3 hrs to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 545..557
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 719..731
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 721..733
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 766..778
                                                                                                                                    packages/vue-template-compiler/build.js on lines 724..736

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

                                                                                                                                    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

                                                                                                                                    strats.data = function (
                                                                                                                                      parentVal,
                                                                                                                                      childVal,
                                                                                                                                      vm
                                                                                                                                    ) {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 2 other locations - About 3 hrs to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 1238..1258
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1445..1465

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

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

                                                                                                                                    function getAndRemoveAttrByRegex (
                                                                                                                                      el,
                                                                                                                                      name
                                                                                                                                    ) {
                                                                                                                                      var list = el.attrsList;
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 3 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 2914..2926
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 3009..3021
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 2104..2116
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2069..2081

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

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

                                                                                                                                    function polyfillBind (fn, ctx) {
                                                                                                                                      function boundFn (a) {
                                                                                                                                        var l = arguments.length;
                                                                                                                                        return l
                                                                                                                                          ? l > 1
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 3 hrs to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 199..211
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 195..207
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 197..209
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 194..206
                                                                                                                                    packages/vue-template-compiler/build.js on lines 151..163

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

                                                                                                                                    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 processFor (el) {
                                                                                                                                      var exp;
                                                                                                                                      if ((exp = getAndRemoveAttr(el, 'v-for'))) {
                                                                                                                                        var res = parseFor(exp);
                                                                                                                                        if (res) {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 3 hrs to fix
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2817..2830

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

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

                                                                                                                                    function addDirective (
                                                                                                                                      el,
                                                                                                                                      name,
                                                                                                                                      rawName,
                                                                                                                                      value,
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 2 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 2752..2771
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 2847..2866
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1942..1961
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1907..1926

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

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

                                                                                                                                    var modifierCode = {
                                                                                                                                      stop: '$event.stopPropagation();',
                                                                                                                                      prevent: '$event.preventDefault();',
                                                                                                                                      self: genGuard("$event.target !== $event.currentTarget"),
                                                                                                                                      ctrl: genGuard("!$event.ctrlKey"),
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 2 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5091..5102
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 4841..4852
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4128..4139
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3758..3769

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

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

                                                                                                                                    function checkIdentifier (
                                                                                                                                      ident,
                                                                                                                                      type,
                                                                                                                                      text,
                                                                                                                                      warn$$1,
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 2 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 6333..6347
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 6083..6097
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4899..4913
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4532..4546

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

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

                                                                                                                                    function genAssignmentCode (
                                                                                                                                      value,
                                                                                                                                      assignment
                                                                                                                                    ) {
                                                                                                                                      var res = parseModel(value);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 2 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 3708..3718
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 3458..3468
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 2618..2628
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2238..2248

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

                                                                                                                                    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 processSlotOutlet (el) {
                                                                                                                                      if (el.tag === 'slot') {
                                                                                                                                        el.slotName = getBindingAttr(el, 'name');
                                                                                                                                        if (process.env.NODE_ENV !== 'production' && el.key) {
                                                                                                                                          warn(
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 2 hrs to fix
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3061..3073

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

                                                                                                                                    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

                                                                                                                                          node.properties.forEach(function (prop) {
                                                                                                                                            if (!prop.key || prop.key.type !== 'Identifier') {
                                                                                                                                              return
                                                                                                                                            }
                                                                                                                                            var key = escodegen.generate(prop.key);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 2 hrs to fix
                                                                                                                                    src/platforms/weex/util/parser.js on lines 23..32

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

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

                                                                                                                                    var keyNames = {
                                                                                                                                      // #7880: IE11 and Edge use `Esc` for Escape key name.
                                                                                                                                      esc: ['Esc', 'Escape'],
                                                                                                                                      tab: 'Tab',
                                                                                                                                      enter: 'Enter',
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 2 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5070..5084
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 4820..4834
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4107..4121
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3737..3751

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

                                                                                                                                    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

                                                                                                                                    function postTransformNode (el, options) {
                                                                                                                                      if (shouldCompile(el, options)) {
                                                                                                                                        // mark child component in parent template
                                                                                                                                        postTransformComponent(el, options);
                                                                                                                                        // mark root in child component template
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 2 hrs to fix
                                                                                                                                    src/platforms/weex/compiler/modules/recycle-list/index.js on lines 39..54

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

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

                                                                                                                                    function dedupeHooks (hooks) {
                                                                                                                                      var res = [];
                                                                                                                                      for (var i = 0; i < hooks.length; i++) {
                                                                                                                                        if (res.indexOf(hooks[i]) === -1) {
                                                                                                                                          res.push(hooks[i]);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 6 other locations - About 2 hrs to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 1279..1287
                                                                                                                                    src/core/util/options.js on lines 162..170
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 1444..1452
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 1446..1454
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1521..1529
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1486..1494

                                                                                                                                    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

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

                                                                                                                                    function checkFunctionParameterExpression (exp, text, warn$$1, range) {
                                                                                                                                      try {
                                                                                                                                        new Function(exp, '');
                                                                                                                                      } catch (e) {
                                                                                                                                        warn$$1(
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 2 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 6371..6382
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 6121..6132
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4937..4948
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4570..4581

                                                                                                                                    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

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

                                                                                                                                    if (process.env.NODE_ENV !== 'production') {
                                                                                                                                      strats.el = strats.propsData = function (parent, child, vm, key) {
                                                                                                                                        if (!vm) {
                                                                                                                                          warn$1(
                                                                                                                                            "option \"" + key + "\" can only be used during instance " +
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 2 other locations - About 2 hrs to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 1151..1161
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1358..1368

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

                                                                                                                                    function repeat$1 (str, n) {
                                                                                                                                      var result = '';
                                                                                                                                      if (n > 0) {
                                                                                                                                        while (true) { // eslint-disable-line
                                                                                                                                          if (n & 1) { result += str; }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 2 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 6425..6436
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 6175..6186
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4991..5002
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4624..4635

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

                                                                                                                                    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 genText$1 (node) {
                                                                                                                                      var value = node.type === 3
                                                                                                                                        ? node.text
                                                                                                                                        : node.type === 2
                                                                                                                                          ? node.tokens.length === 1
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 2 hrs to fix
                                                                                                                                    src/platforms/weex/compiler/modules/recycle-list/text.js on lines 5..14

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

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

                                                                                                                                    function rangeSetItem (
                                                                                                                                      item,
                                                                                                                                      range
                                                                                                                                    ) {
                                                                                                                                      if (range) {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 2 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 2928..2941
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 3023..3036
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 2118..2131
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2083..2096

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

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

                                                                                                                                    Observer.prototype.walk = function walk (obj) {
                                                                                                                                      var keys = Object.keys(obj);
                                                                                                                                      for (var i = 0; i < keys.length; i++) {
                                                                                                                                        defineReactive$$1(obj, keys[i]);
                                                                                                                                      }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 2 hrs to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 926..931
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 1123..1128
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 1125..1130
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1200..1205
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1164..1169

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

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

                                                                                                                                    function mergeAssets (
                                                                                                                                      parentVal,
                                                                                                                                      childVal,
                                                                                                                                      vm,
                                                                                                                                      key
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 2 other locations - About 2 hrs to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 1300..1313
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1507..1520

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

                                                                                                                                    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

                                                                                                                                    function preTransformNode$1 (el, options) {
                                                                                                                                      if (el.tag === 'recycle-list') {
                                                                                                                                        preTransformRecycleList(el, options);
                                                                                                                                        currentRecycleList = el;
                                                                                                                                      }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 2 hrs to fix
                                                                                                                                    src/platforms/weex/compiler/modules/recycle-list/index.js on lines 20..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 80.

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

                                                                                                                                    function flushCallbacks () {
                                                                                                                                      var copies = callbacks.slice(0);
                                                                                                                                      callbacks.length = 0;
                                                                                                                                      for (var i = 0; i < copies.length; i++) {
                                                                                                                                        copies[i]();
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 2 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 2054..2060
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 2056..2062
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1647..1653
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1612..1618

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

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

                                                                                                                                    function genData$2 (el) {
                                                                                                                                      var data = '';
                                                                                                                                      if (el.staticStyle) {
                                                                                                                                        data += "staticStyle:" + (el.staticStyle) + ",";
                                                                                                                                      }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 9 other locations - About 2 hrs to fix
                                                                                                                                    packages/weex-template-compiler/build.js on lines 4294..4303
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 2969..2978
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 3014..3023
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 3064..3073
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 3109..3118
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 2159..2168
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 2219..2228
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2124..2133
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2184..2193

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

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

                                                                                                                                    function genData$1 (el) {
                                                                                                                                      var data = '';
                                                                                                                                      if (el.staticClass) {
                                                                                                                                        data += "staticClass:" + (el.staticClass) + ",";
                                                                                                                                      }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 9 other locations - About 2 hrs to fix
                                                                                                                                    packages/weex-template-compiler/build.js on lines 4365..4374
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 2969..2978
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 3014..3023
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 3064..3073
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 3109..3118
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 2159..2168
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 2219..2228
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2124..2133
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2184..2193

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

                                                                                                                                    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 optimize (root, options) {
                                                                                                                                      if (!root) { return }
                                                                                                                                      isStaticKey = genStaticKeysCached(options.staticKeys || '');
                                                                                                                                      isPlatformReservedTag = options.isReservedTag || no;
                                                                                                                                      // first pass: mark all non-static nodes.
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 2 other locations - About 2 hrs to fix
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 3978..3986
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3608..3616

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

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

                                                                                                                                    function parseModifiers (name) {
                                                                                                                                      var match = name.match(modifierRE);
                                                                                                                                      if (match) {
                                                                                                                                        var ret = {};
                                                                                                                                        match.forEach(function (m) { ret[m.slice(1)] = true; });
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 2 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 4699..4706
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 4449..4456
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 3609..3616
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3230..3237

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

                                                                                                                                    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 on (el, dir) {
                                                                                                                                      if (process.env.NODE_ENV !== 'production' && dir.modifiers) {
                                                                                                                                        warn$1("v-on without argument does not support modifiers.");
                                                                                                                                      }
                                                                                                                                      el.wrapListeners = function (code) { return ("_g(" + code + "," + (dir.value) + ")"); };
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 2 hrs to fix
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3882..3887

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

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

                                                                                                                                    function genNode (node, state) {
                                                                                                                                      if (node.type === 1) {
                                                                                                                                        return genElement(node, state)
                                                                                                                                      } else if (node.type === 3 && node.isComment) {
                                                                                                                                        return genComment(node)
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 2 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5704..5712
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 5454..5462
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4741..4749
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4374..4382

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

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

                                                                                                                                    if (inBrowser) {
                                                                                                                                      try {
                                                                                                                                        var opts = {};
                                                                                                                                        Object.defineProperty(opts, 'passive', ({
                                                                                                                                          get: function get () {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 2 hrs to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 531..540
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 705..714
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 707..716
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 752..761
                                                                                                                                    packages/vue-template-compiler/build.js on lines 710..719

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

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

                                                                                                                                    function checkFor (node, text, warn$$1, range) {
                                                                                                                                      checkExpression(node.for || '', text, warn$$1, range);
                                                                                                                                      checkIdentifier(node.alias, 'v-for alias', text, warn$$1, range);
                                                                                                                                      checkIdentifier(node.iterator1, 'v-for iterator', text, warn$$1, range);
                                                                                                                                      checkIdentifier(node.iterator2, 'v-for iterator', text, warn$$1, range);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 2 hrs to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 6326..6331
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 6076..6081
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4892..4897
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4525..4530

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

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

                                                                                                                                    function genComponent (
                                                                                                                                      componentName,
                                                                                                                                      el,
                                                                                                                                      state
                                                                                                                                    ) {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 hr to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5750..5757
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 5500..5507
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4787..4794
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4420..4427

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

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

                                                                                                                                    var buildRegex = cached(function (delimiters) {
                                                                                                                                      var open = delimiters[0].replace(regexEscapeRE, '\\$&');
                                                                                                                                      var close = delimiters[1].replace(regexEscapeRE, '\\$&');
                                                                                                                                      return new RegExp(open + '((?:.|\\n)+?)' + close, 'g')
                                                                                                                                    });
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 hr to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 2671..2675
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 2766..2770
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1861..1865
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1826..1830

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

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

                                                                                                                                    function addProp (el, name, value, range, dynamic) {
                                                                                                                                      (el.props || (el.props = [])).push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));
                                                                                                                                      el.plain = false;
                                                                                                                                    }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 hr to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 2733..2736
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 2828..2831
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1923..1926
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1888..1891

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

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

                                                                                                                                    function copyAugment (target, src, keys) {
                                                                                                                                      for (var i = 0, l = keys.length; i < l; i++) {
                                                                                                                                        var key = keys[i];
                                                                                                                                        def(target, key, src[key]);
                                                                                                                                      }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 1 hr to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 959..964
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 1156..1161
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 1158..1163
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1233..1238
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1197..1202

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

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

                                                                                                                                    Observer.prototype.observeArray = function observeArray (items) {
                                                                                                                                      for (var i = 0, l = items.length; i < l; i++) {
                                                                                                                                        observe(items[i]);
                                                                                                                                      }
                                                                                                                                    };
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 1 hr to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 936..940
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 1133..1137
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 1135..1139
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1210..1214
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1174..1178

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

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

                                                                                                                                    function cached (fn) {
                                                                                                                                      var cache = Object.create(null);
                                                                                                                                      return (function cachedFn (str) {
                                                                                                                                        var hit = cache[str];
                                                                                                                                        return hit || (cache[str] = fn(str))
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 1 hr to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 159..165
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 155..161
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 157..163
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 161..167
                                                                                                                                    packages/vue-template-compiler/build.js on lines 118..124

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

                                                                                                                                    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

                                                                                                                                    function model (
                                                                                                                                      el,
                                                                                                                                      dir
                                                                                                                                    ) {
                                                                                                                                      if (el.tag === 'input' || el.tag === 'textarea') {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 1 hr to fix
                                                                                                                                    src/platforms/weex/compiler/directives/model.js on lines 6..15

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

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

                                                                                                                                    function isDirectChildOfTemplateFor (node) {
                                                                                                                                      while (node.parent) {
                                                                                                                                        node = node.parent;
                                                                                                                                        if (node.tag !== 'template') {
                                                                                                                                          return false
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 2 other locations - About 1 hr to fix
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4074..4085
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3704..3715

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

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

                                                                                                                                    function processComponent (el) {
                                                                                                                                      var binding;
                                                                                                                                      if ((binding = getBindingAttr(el, 'is'))) {
                                                                                                                                        el.component = binding;
                                                                                                                                      }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 1 hr to fix
                                                                                                                                    src/compiler/parser/index.js on lines 752..760
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 4545..4553
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 4295..4303
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 3455..3463
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3075..3083

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

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

                                                                                                                                    function mergeHook (
                                                                                                                                      parentVal,
                                                                                                                                      childVal
                                                                                                                                    ) {
                                                                                                                                      var res = childVal
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 1 hr to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 1263..1277
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 1428..1442
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 1430..1444
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1505..1519
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1470..1484

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

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

                                                                                                                                    function hash(str) {
                                                                                                                                      var hash = 5381;
                                                                                                                                      var i = str.length;
                                                                                                                                      while(i) {
                                                                                                                                        hash = (hash * 33) ^ str.charCodeAt(--i);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 1 hr to fix
                                                                                                                                    src/compiler/codegen/index.js on lines 419..426
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5600..5607
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 5350..5357
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4637..4644
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4270..4277

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

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

                                                                                                                                    function remove (arr, item) {
                                                                                                                                      if (arr.length) {
                                                                                                                                        var index = arr.indexOf(item);
                                                                                                                                        if (index > -1) {
                                                                                                                                          return arr.splice(index, 1)
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 1 hr to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 139..146
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 135..142
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 137..144
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 141..148
                                                                                                                                    packages/vue-template-compiler/build.js on lines 98..105

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

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

                                                                                                                                    function generate (
                                                                                                                                      ast,
                                                                                                                                      options
                                                                                                                                    ) {
                                                                                                                                      var state = new CodegenState(options);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 hr to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 6037..6047
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 5787..5797
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 5516..5526
                                                                                                                                    packages/vue-template-compiler/build.js on lines 5149..5159

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

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

                                                                                                                                    function isForbiddenTag (el) {
                                                                                                                                      return (
                                                                                                                                        el.tag === 'style' ||
                                                                                                                                        (el.tag === 'script' && (
                                                                                                                                          !el.attrsMap.type ||
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 hr to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 4726..4734
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 4476..4484
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 3636..3644
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3258..3266

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

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

                                                                                                                                    function genStaticKeys (modules) {
                                                                                                                                      return modules.reduce(function (keys, m) {
                                                                                                                                        return keys.concat(m.staticKeys || [])
                                                                                                                                      }, []).join(',')
                                                                                                                                    }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 hr to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 264..268
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 266..270
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 250..254
                                                                                                                                    packages/vue-template-compiler/build.js on lines 207..211

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

                                                                                                                                    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 parseHandlerParams (handler) {
                                                                                                                                      var res = inlineStatementRE.exec(handler.value);
                                                                                                                                      if (res && res[2]) {
                                                                                                                                        handler.params = res[2].split(/\s*,\s*/);
                                                                                                                                      }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 1 hr to fix
                                                                                                                                    src/platforms/weex/compiler/modules/recycle-list/v-on.js on lines 5..10

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

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

                                                                                                                                    function addRawAttr (el, name, value, range) {
                                                                                                                                      el.attrsMap[name] = value;
                                                                                                                                      el.attrsList.push(rangeSetItem({ name: name, value: value }, range));
                                                                                                                                    }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 hr to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 2747..2750
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 2842..2845
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1937..1940
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1902..1905

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

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

                                                                                                                                    var keyCodes = {
                                                                                                                                      esc: 27,
                                                                                                                                      tab: 9,
                                                                                                                                      enter: 13,
                                                                                                                                      space: 32,
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 hr to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5057..5067
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 4807..4817
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4094..4104
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3724..3734

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

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

                                                                                                                                    function containsSlotChild (el) {
                                                                                                                                      if (el.type === 1) {
                                                                                                                                        if (el.tag === 'slot') {
                                                                                                                                          return true
                                                                                                                                        }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 hr to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5609..5617
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 5359..5367
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4646..4654
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4279..4287

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

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

                                                                                                                                    function pluckModuleFunction (
                                                                                                                                      modules,
                                                                                                                                      key
                                                                                                                                    ) {
                                                                                                                                      return modules
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 hr to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 2724..2731
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 2819..2826
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1914..1921
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1879..1886

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

                                                                                                                                    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 (res.iterator2) {
                                                                                                                                        desc['@key'] = res.iterator1;
                                                                                                                                        desc['@index'] = res.iterator2;
                                                                                                                                      } else {
                                                                                                                                        desc['@index'] = res.iterator1;
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 1 hr to fix
                                                                                                                                    src/platforms/weex/compiler/modules/recycle-list/v-for.js on lines 24..29

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

                                                                                                                                    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 assertObjectType (name, value, vm) {
                                                                                                                                      if (!isPlainObject(value)) {
                                                                                                                                        warn$1(
                                                                                                                                          "Invalid value for option \"" + name + "\": expected an Object, " +
                                                                                                                                          "but got " + (toRawType(value)) + ".",
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 2 other locations - About 1 hr to fix
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1629..1637
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1594..1602

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

                                                                                                                                    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 isValidArrayIndex (val) {
                                                                                                                                      var n = parseFloat(String(val));
                                                                                                                                      return n >= 0 && Math.floor(n) === n && isFinite(val)
                                                                                                                                    }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 2 other locations - About 1 hr to fix
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 105..108
                                                                                                                                    packages/vue-template-compiler/build.js on lines 62..65

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

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

                                                                                                                                    function createFunction (code, errors) {
                                                                                                                                      try {
                                                                                                                                        return new Function(code)
                                                                                                                                      } catch (err) {
                                                                                                                                        errors.push({ err: err, code: code });
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 hr to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 6442..6449
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 6192..6199
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 5008..5015
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4641..4648

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

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

                                                                                                                                    function createASTElement (
                                                                                                                                      tag,
                                                                                                                                      attrs,
                                                                                                                                      parent
                                                                                                                                    ) {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 hr to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 3854..3868
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 3604..3618
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 2764..2778
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2384..2398

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

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

                                                                                                                                    function genText (text) {
                                                                                                                                      return ("_v(" + (text.type === 2
                                                                                                                                        ? text.expression // no need for () because already wrapped in _s()
                                                                                                                                        : transformSpecialNewlines(JSON.stringify(text.text))) + ")")
                                                                                                                                    }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 hr to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5714..5718
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 5464..5468
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4751..4755
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4384..4388

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

                                                                                                                                    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 baseOptions = {
                                                                                                                                      modules: modules,
                                                                                                                                      directives: directives,
                                                                                                                                      isUnaryTag: isUnaryTag$1,
                                                                                                                                      mustUseProp: mustUseProp,
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 1 hr to fix
                                                                                                                                    src/platforms/weex/compiler/index.js on lines 17..28

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

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

                                                                                                                                    function checkInFor (el) {
                                                                                                                                      var parent = el;
                                                                                                                                      while (parent) {
                                                                                                                                        if (parent.for !== undefined) {
                                                                                                                                          return true
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 hr to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 4688..4697
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 4438..4447
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 3598..3607
                                                                                                                                    packages/vue-template-compiler/build.js on lines 3219..3228

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

                                                                                                                                    function def (obj, key, val, enumerable) {
                                                                                                                                      Object.defineProperty(obj, key, {
                                                                                                                                        value: val,
                                                                                                                                        enumerable: !!enumerable,
                                                                                                                                        writable: true,
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 1 hr to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 675..682
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 677..684
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 291..298
                                                                                                                                    packages/vue-template-compiler/build.js on lines 248..255

                                                                                                                                    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

                                                                                                                                    function postTransformText (el) {
                                                                                                                                      // weex <text> can only contain text, so the parser
                                                                                                                                      // always generates a single child.
                                                                                                                                      if (el.children.length) {
                                                                                                                                        addAttr(el, 'value', genText$1(el.children[0]));
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 1 hr to fix
                                                                                                                                    src/platforms/weex/compiler/modules/recycle-list/text.js on lines 16..23

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

                                                                                                                                    function processRef (el) {
                                                                                                                                      var ref = getBindingAttr(el, 'ref');
                                                                                                                                      if (ref) {
                                                                                                                                        el.ref = ref;
                                                                                                                                        el.refInFor = checkInFor(el);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 55 mins to fix
                                                                                                                                    src/compiler/parser/index.js on lines 485..491
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 4279..4285
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 4029..4035
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 3189..3195
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2809..2815

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

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

                                                                                                                                    function isPrimitive (value) {
                                                                                                                                      return (
                                                                                                                                        typeof value === 'string' ||
                                                                                                                                        typeof value === 'number' ||
                                                                                                                                        // $flow-disable-line
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 55 mins to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 32..40
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 32..40
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 34..42
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 66..74
                                                                                                                                    packages/vue-template-compiler/build.js on lines 23..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 54.

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

                                                                                                                                    var camelize = cached(function (str) {
                                                                                                                                      return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
                                                                                                                                    });
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 55 mins to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 171..173
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 167..169
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 169..171
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 173..175
                                                                                                                                    packages/vue-template-compiler/build.js on lines 130..132

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

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

                                                                                                                                    function getRawBindingAttr (
                                                                                                                                      el,
                                                                                                                                      name
                                                                                                                                    ) {
                                                                                                                                      return el.rawAttrsMap[':' + name] ||
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 55 mins to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 2862..2869
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 2957..2964
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 2052..2059
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2017..2024

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

                                                                                                                                    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 classList = staticClass.trim().split(' ').map(function (name) {
                                                                                                                                          var result = parseText(name, options.delimiters);
                                                                                                                                          if (result) {
                                                                                                                                            dynamic = true;
                                                                                                                                            return result.expression
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 50 mins to fix
                                                                                                                                    src/platforms/weex/compiler/modules/class.js on lines 55..62

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

                                                                                                                                    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 (res.iterator2) {
                                                                                                                                        // (item, key, index) for object iteration
                                                                                                                                        // is this even supported?
                                                                                                                                        addRawAttr(el, 'index', res.iterator2);
                                                                                                                                      } else if (res.iterator1) {
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 50 mins to fix
                                                                                                                                    src/platforms/weex/compiler/modules/recycle-list/recycle-list.js on lines 38..44

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

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

                                                                                                                                    function addIfCondition (el, condition) {
                                                                                                                                      if (!el.ifConditions) {
                                                                                                                                        el.ifConditions = [];
                                                                                                                                      }
                                                                                                                                      el.ifConditions.push(condition);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 45 mins to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 4376..4381
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 4126..4131
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 3286..3291
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2906..2911

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

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

                                                                                                                                    var prohibitedKeywordRE = new RegExp('\\b' + (
                                                                                                                                      'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +
                                                                                                                                      'super,throw,while,yield,delete,export,import,return,switch,default,' +
                                                                                                                                      'extends,finally,continue,debugger,function,arguments'
                                                                                                                                    ).split(',').join('\\b|\\b') + '\\b');
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 40 mins to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 6263..6267
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 6013..6017
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4829..4833
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4462..4466

                                                                                                                                    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

                                                                                                                                    function containVOnce (el) {
                                                                                                                                      for (var attr in el.attrsMap) {
                                                                                                                                        if (/^v\-once$/i.test(attr)) {
                                                                                                                                          return true
                                                                                                                                        }
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 40 mins to fix
                                                                                                                                    packages/weex-template-compiler/build.js on lines 4653..4660

                                                                                                                                    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

                                                                                                                                    function hasConditionDirective (el) {
                                                                                                                                      for (var attr in el.attrsMap) {
                                                                                                                                        if (/^v\-if|v\-else|v\-else\-if$/.test(attr)) {
                                                                                                                                          return true
                                                                                                                                        }
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 40 mins to fix
                                                                                                                                    packages/weex-template-compiler/build.js on lines 4771..4778

                                                                                                                                    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

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

                                                                                                                                    Dep.prototype.depend = function depend () {
                                                                                                                                      if (Dep.target) {
                                                                                                                                        Dep.target.addDep(this);
                                                                                                                                      }
                                                                                                                                    };
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 40 mins to fix
                                                                                                                                    packages/weex-vue-framework/factory.js on lines 711..715
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 1004..1008
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 1006..1010
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 1049..1053
                                                                                                                                    packages/vue-template-compiler/build.js on lines 1007..1011

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

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

                                                                                                                                    function decodeAttr (value, shouldDecodeNewlines) {
                                                                                                                                      var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;
                                                                                                                                      return value.replace(re, function (match) { return decodingMap[match]; })
                                                                                                                                    }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 40 mins to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 3413..3416
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 3163..3166
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 337..340
                                                                                                                                    packages/vue-template-compiler/build.js on lines 294..297

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

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

                                                                                                                                    function genIf (
                                                                                                                                      el,
                                                                                                                                      state,
                                                                                                                                      altGen,
                                                                                                                                      altEmpty
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 4 other locations - About 40 mins to fix
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 5354..5362
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 5104..5112
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 4391..4399
                                                                                                                                    packages/vue-template-compiler/build.js on lines 4021..4029

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

                                                                                                                                    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

                                                                                                                                    function postTransformComponent (
                                                                                                                                      el,
                                                                                                                                      options
                                                                                                                                    ) {
                                                                                                                                      // $flow-disable-line (we know isReservedTag is there)
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 40 mins to fix
                                                                                                                                    src/platforms/weex/compiler/modules/recycle-list/component.js on lines 8..16

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

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

                                                                                                                                    function processOnce (el) {
                                                                                                                                      var once$$1 = getAndRemoveAttr(el, 'v-once');
                                                                                                                                      if (once$$1 != null) {
                                                                                                                                        el.once = true;
                                                                                                                                      }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 5 other locations - About 35 mins to fix
                                                                                                                                    src/compiler/parser/index.js on lines 594..599
                                                                                                                                    packages/vue-server-renderer/basic.js on lines 4383..4388
                                                                                                                                    packages/vue-server-renderer/build.dev.js on lines 4133..4138
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 3293..3298
                                                                                                                                    packages/vue-template-compiler/build.js on lines 2913..2918

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

                                                                                                                                    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

                                                                                                                                    function postTransformComponentRoot (el) {
                                                                                                                                      if (!el.parent) {
                                                                                                                                        // component root
                                                                                                                                        addAttr(el, '@isComponentRoot', 'true');
                                                                                                                                        addAttr(el, '@templateId', '_uid');
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 35 mins to fix
                                                                                                                                    src/platforms/weex/compiler/modules/recycle-list/component-root.js on lines 6..13

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

                                                                                                                                    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 extend (to, _from) {
                                                                                                                                      for (var key in _from) {
                                                                                                                                        to[key] = _from[key];
                                                                                                                                      }
                                                                                                                                      return to
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 2 other locations - About 35 mins to fix
                                                                                                                                    packages/vue-template-compiler/browser.js on lines 219..224
                                                                                                                                    packages/vue-template-compiler/build.js on lines 176..181

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

                                                                                                                                    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 (isUnitaryTag(el.tag) && !el.attrsList.some(function (item) { return item.name === 'append'; })) {
                                                                                                                                        el.attrsMap.append = 'tree';
                                                                                                                                        el.attrsList.push({ name: 'append', value: 'tree' });
                                                                                                                                      }
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in packages/weex-template-compiler/build.js and 1 other location - About 30 mins to fix
                                                                                                                                    src/platforms/weex/compiler/modules/append.js on lines 10..13

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

                                                                                                                                    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

                                                                                                                                    There are no issues that match your filters.

                                                                                                                                    Category
                                                                                                                                    Status