File vue.js
has 5922 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Vue.js v2.0.3
* (c) 2014-2016 Evan You
* Released under the MIT License.
*/
Function createPatchFunction
has 411 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createPatchFunction (backend) {
var i, j;
var cbs = {};
var modules = backend.modules;
Function parseHTML
has 178 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 index = 0;
Function parse
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parse (
template,
options
) {
warn$1 = options.warn || baseWarn;
Function renderMixin
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
function renderMixin (Vue) {
Vue.prototype.$nextTick = function (fn) {
nextTick(fn, this);
};
Function lifecycleMixin
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
function lifecycleMixin (Vue) {
Vue.prototype._mount = function (
el,
hydrating
) {
Function start
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
start: function start (tag, attrs, unary) {
// check namespace.
// inherit parent ns if there is one
var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
Function enter
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
function enter (vnode) {
var el = vnode.elm;
// call leave callback now
if (el._leaveCb) {
Function leave
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function leave (vnode, rm) {
var el = vnode.elm;
// call enter callback now
if (el._enterCb) {
Function updateChildren
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {
var oldStartIdx = 0;
var newStartIdx = 0;
var oldEndIdx = oldCh.length - 1;
var oldStartVnode = oldCh[0];
Function render
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function render (h) {
var this$1 = this;
var children = this.$slots.default;
if (!children) {
Function patch
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function patch (oldVnode, vnode, hydrating, removeOnly) {
if (!vnode) {
if (oldVnode) { invokeDestroyHook(oldVnode); }
return
}
Function parseFilters
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parseFilters (exp) {
var inSingle = false;
var inDouble = false;
var curly = 0;
var square = 0;
Function initMixin
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initMixin (Vue) {
Vue.prototype._init = function (options) {
var vm = this;
// a uid
vm._uid = uid++;
Function genData
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
function genData (el) {
if (el.plain) {
return
}
Function eventsMixin
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function eventsMixin (Vue) {
Vue.prototype.$on = function (event, fn) {
var vm = this;(vm._events[event] || (vm._events[event] = [])).push(fn);
return vm
};
Function updateDirectives
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function updateDirectives (
oldVnode,
vnode
) {
if (!oldVnode.data.directives && !vnode.data.directives) {
Function processAttrs
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function processAttrs (el) {
var list = el.attrsList;
var i, l, name, rawName, value, arg, modifiers, isProp;
for (i = 0, l = list.length; i < l; i++) {
name = rawName = list[i].name;
Function hydrate
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function hydrate (elm, vnode, insertedVnodeQueue) {
{
if (!assertNodeMatch(elm, vnode)) {
return false
}
Function nextTick
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
var nextTick = (function () {
var callbacks = [];
var pending = false;
var timerFunc;
Function getTransitionInfo
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getTransitionInfo (el, expectedType) {
var styles = window.getComputedStyle(el);
var transitioneDelays = styles[transitionProp + 'Delay'].split(', ');
var transitionDurations = styles[transitionProp + 'Duration'].split(', ');
var transitionTimeout = getTimeout(transitioneDelays, transitionDurations);
Function _render
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Vue.prototype._render = function () {
var vm = this;
var ref = vm.$options;
var render = ref.render;
var staticRenderFns = ref.staticRenderFns;
Function initExtend
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initExtend (Vue) {
/**
* Each instance constructor, including Vue, has a unique
* cid. This enables us to create wrapped "child
* constructors" for prototypal inheritance and cache them.
Function genDefaultModel
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function genDefaultModel (
el,
value,
modifiers
) {
Function createComponent
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createComponent (
Ctor,
data,
context,
children,
Function defineReactive$$1
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function defineReactive$$1 (
obj,
key,
val,
customSetter
Function createElm
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createElm (vnode, insertedVnodeQueue, nested) {
var i;
var data = vnode.data;
vnode.isRootInsert = !nested;
if (isDef(data)) {
Function assertProp
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function assertProp (
prop,
name,
value,
vm,
Function compileToFunctions
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function compileToFunctions (
template,
options,
vm
) {
Function extend
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Vue.extend = function (extendOptions) {
extendOptions = extendOptions || {};
var Super = this;
var isFirstExtend = Super.cid === 0;
if (isFirstExtend && extendOptions._Ctor) {
Function patchVnode
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function patchVnode (oldVnode, vnode, insertedVnodeQueue, removeOnly) {
if (oldVnode === vnode) {
return
}
// reuse element for static trees.
Function updateListeners
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function updateListeners (
on,
oldOn,
add,
remove$$1,
Function $mount
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Vue$3.prototype.$mount = function (
el,
hydrating
) {
el = el && query(el);
Function render
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function render (h) {
var tag = this.tag || this.$vnode.data.tag || 'span';
var map = Object.create(null);
var prevChildren = this.prevChildren = this.children;
var rawChildren = this.$slots.default || [];
Function handleStartTag
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function handleStartTag (match) {
var tagName = match.tagName;
var unarySlash = match.unarySlash;
if (expectHTML) {
Function data
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
strats.data = function (
parentVal,
childVal,
vm
) {
Function parseEndTag
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parseEndTag (tag, tagName, start, end) {
var pos;
if (start == null) { start = index; }
if (end == null) { end = index; }
Function mergeOptions
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function mergeOptions (
parent,
child,
vm
) {
Function Watcher
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Watcher = function Watcher (
vm,
expOrFn,
cb,
options
Function normalizeChildren
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function normalizeChildren (
children,
ns,
nestedIndex
) {
Function stateMixin
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function stateMixin (Vue) {
// flow somehow has problems with directly declared definition object
// when using Object.defineProperty, so we have to procedurally build up
// the object here.
var dataDef = {};
Function resolveAsyncComponent
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function resolveAsyncComponent (
factory,
cb
) {
if (factory.requested) {
Function inserted
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
inserted: function inserted (el, binding, vnode) {
{
if (!modelableTagRE.test(vnode.tag)) {
warn(
"v-model is not supported on element type: <" + (vnode.tag) + ">. " +
Function _mount
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Vue.prototype._mount = function (
el,
hydrating
) {
var vm = this;
Function setSelected
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setSelected (el, binding, vm) {
var value = binding.value;
var isMultiple = el.multiple;
if (isMultiple && !Array.isArray(value)) {
"development" !== 'production' && warn(
Function updateDOMProps
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function updateDOMProps (oldVnode, vnode) {
if (!oldVnode.data.domProps && !vnode.data.domProps) {
return
}
var key, cur;
Function _createElement
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _createElement (
context,
tag,
data,
children
Function updateStyle
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function updateStyle (oldVnode, vnode) {
if ((!oldVnode.data || !oldVnode.data.style) && !vnode.data.style) {
return
}
var cur, name;
Function resolveSlots
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function resolveSlots (
renderChildren,
context
) {
var slots = {};
Function _updateFromParent
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Vue.prototype._updateFromParent = function (
propsData,
listeners,
parentVnode,
renderChildren
Function chars
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
chars: function chars (text) {
if (!currentParent) {
if ("development" !== 'production' && !warned && text === template) {
warned = true;
warn$1(
Function run
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Watcher.prototype.run = function run () {
if (this.active) {
var value = this.get();
if (
value !== this.value ||
Function initAssetRegisters
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initAssetRegisters (Vue) {
/**
* Create asset registration methods.
*/
config._assetTypes.forEach(function (type) {
Function genCheckboxModel
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function genCheckboxModel (el, value) {
if ("development" !== 'production' &&
el.attrsMap.checked != null) {
warn$3(
"<" + (el.tag) + " v-model=\"" + value + "\" checked>:\n" +
Function $destroy
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Vue.prototype.$destroy = function () {
var vm = this;
if (vm._isBeingDestroyed) {
return
}
Function _update
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Vue.prototype._update = function (vnode, hydrating) {
var vm = this;
if (vm._isMounted) {
callHook(vm, 'beforeUpdate');
}
Function initData
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initData (vm) {
var data = vm.$options.data;
data = vm._data = typeof data === 'function'
? data.call(vm)
: data || {};
Function updateAttrs
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function updateAttrs (oldVnode, vnode) {
if (!oldVnode.data.attrs && !vnode.data.attrs) {
return
}
var key, cur, old;
Function genHandler
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function genHandler (
handler
) {
if (!handler) {
return 'function(){}'
Function flushSchedulerQueue
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function flushSchedulerQueue () {
flushing = true;
// Sort queue before flush.
// This ensures that:
Function genElement
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function genElement (el) {
if (el.staticRoot && !el.staticProcessed) {
// hoist static sub-trees out
el.staticProcessed = true;
staticRenderFns.push(("with(this){return " + (genElement(el)) + "}"));
Function VNode
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
tag,
data,
children,
text,
elm,
Function addDirective
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
el,
name,
rawName,
value,
arg,
Avoid deeply nested control flow statements. Open
if (expression === undefined) {
// first filter, end of expression
lastFilterIndex = i + 1;
expression = exp.slice(0, i).trim();
} else {
Avoid deeply nested control flow statements. Open
for (var i = 0; i < old.length; i++) { old[i] = cur[i]; }
Avoid deeply nested control flow statements. Open
if ("development" !== 'production' &&
typeof console !== 'undefined' &&
!bailed) {
bailed = true;
console.warn('Parent: ', elm);
Avoid deeply nested control flow statements. Open
if ("development" !== 'production' && name === 'model') {
checkForAliasModel(el, value);
}
Avoid deeply nested control flow statements. Open
if (name === 'v-for') {
checkFor(node, ("v-for=\"" + value + "\""), errors);
} else {
checkExpression(value, (name + "=\"" + value + "\""), errors);
}
Function addVnodes
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function addVnodes (parentElm, before, vnodes, startIdx, endIdx, insertedVnodeQueue) {
Avoid deeply nested control flow statements. Open
if (conditionalEnd >= 0) {
advance(conditionalEnd + 2);
continue
}
Avoid deeply nested control flow statements. Open
if (argMatch && (arg = argMatch[1])) {
name = name.slice(0, -(arg.length + 1));
}
Avoid deeply nested control flow statements. Open
for (var i = 0; i < cbs.create.length; ++i) {
cbs.create[i](emptyNode, vnode.parent);
}
Avoid deeply nested control flow statements. Open
for (var i$1 = 0; i$1 < children.length; i$1++) {
if (!hydrate(childNodes[i$1], children[i$1], insertedVnodeQueue)) {
childrenMatch = false;
break
}
Avoid deeply nested control flow statements. Open
if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {
invokeInsertHook(vnode, insertedVnodeQueue, true);
return oldVnode
} else {
warn(
Avoid deeply nested control flow statements. Open
if (c.text && last && last.text) {
last.text += c.text;
} else {
// inherit parent namespace
if (ns) {
Avoid deeply nested control flow statements. Open
if (commentEnd >= 0) {
advance(commentEnd + 3);
continue
}
Avoid deeply nested control flow statements. Open
if (name === 'innerHtml') { name = 'innerHTML'; }
Avoid deeply nested control flow statements. Open
switch (c) {
case 0x22: inDouble = true; break // "
case 0x27: inSingle = true; break // '
case 0x28: paren++; break // (
case 0x29: paren--; break // )
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
Consider simplifying this complex logical expression. Open
} else if (
observerState.shouldConvert &&
!config._isServer &&
(Array.isArray(value) || isPlainObject(value)) &&
Object.isExtensible(value) &&
Function createComponent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Ctor,
data,
context,
children,
tag
Function updateListeners
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
on,
oldOn,
add,
remove$$1,
vm
Function checkProp
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
res,
hash,
key,
altKey,
preserve
Function assertProp
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
prop,
name,
value,
vm,
absent
Function addHandler
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
el,
name,
value,
modifiers,
important
Function createFunctionalComponent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Ctor,
propsData,
data,
context,
children
Function updateChildren
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {
Avoid too many return
statements within this function. Open
return vnode
Avoid too many return
statements within this function. Open
return placeholder(h, rawChild)
Avoid too many return
statements within this function. Open
return rawChild
Avoid too many return
statements within this function. Open
return val
Avoid too many return
statements within this function. Open
return res
Avoid too many return
statements within this function. Open
return genSlot(el)
Avoid too many return
statements within this function. Open
return code
Avoid too many return
statements within this function. Open
return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))
Avoid too many return
statements within this function. Open
return placeholder(h, rawChild)
Avoid too many return
statements within this function. Open
return function mergedInstanceDataFn () {
// instance merge
var instanceData = typeof childVal === 'function'
? childVal.call(vm)
: childVal;
Avoid too many return
statements within this function. Open
return new VNode(
tag, data, normalizeChildren(children, ns),
undefined, undefined, ns, context
)
Avoid too many return
statements within this function. Open
return createComponent(tag, data, context, children)
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (el.classList) {
if (cls.indexOf(' ') > -1) {
cls.split(/\s+/).forEach(function (c) { return el.classList.add(c); });
} else {
el.classList.add(cls);
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (el.classList) {
if (cls.indexOf(' ') > -1) {
cls.split(/\s+/).forEach(function (c) { return el.classList.remove(c); });
} else {
el.classList.remove(cls);
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (expectsCSS) {
addTransitionClass(el, startClass);
addTransitionClass(el, activeClass);
nextFrame(function () {
removeTransitionClass(el, startClass);
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (expectsCSS) {
addTransitionClass(el, leaveClass);
addTransitionClass(el, leaveActiveClass);
nextFrame(function () {
removeTransitionClass(el, leaveClass);
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if ("development" !== 'production' &&
el.attrsMap.checked != null) {
warn$3(
"<" + (el.tag) + " v-model=\"" + value + "\" checked>:\n" +
"inline checked attributes will be ignored when using v-model. " +
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if ("development" !== 'production' &&
el.attrsMap.checked != null) {
warn$3(
"<" + (el.tag) + " v-model=\"" + value + "\" checked>:\n" +
"inline checked attributes will be ignored when using v-model. " +
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (/^<!--/.test(html)) {
var commentEnd = html.indexOf('-->');
if (commentEnd >= 0) {
advance(commentEnd + 3);
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (/^<!\[/.test(html)) {
var conditionalEnd = html.indexOf(']>');
if (conditionalEnd >= 0) {
advance(conditionalEnd + 2);
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
function addAttr (el, name, value) {
(el.attrs || (el.attrs = [])).push({ name: name, value: value });
}
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
function addProp (el, name, value) {
(el.props || (el.props = [])).push({ name: name, value: value });
}
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
'accept,accept-charset,accesskey,action,align,alt,async,autocomplete,' +
'autofocus,autoplay,autosave,bgcolor,border,buffered,challenge,charset,' +
'checked,cite,class,code,codebase,color,cols,colspan,content,http-equiv,' +
'name,contenteditable,contextmenu,controls,coords,data,datetime,default,' +
'defer,dir,dirname,disabled,download,draggable,dropzone,enctype,method,for,' +
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
for (var i = 0; i < vnodes.length; i++) {
res[i] = cloneVNode(vnodes[i]);
}
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
for (i = 0; i < cbs.remove.length; ++i) {
cbs.remove[i](vnode, rm);
}
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76