Showing 611 of 611 total issues
Function computeStyleTests
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function computeStyleTests() {
var contents, divStyle,
documentElement = document.documentElement;
// Setup
Function forceUpdate
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
forceUpdate: function forceUpdate() {
if (isDestroyed) {
return;
}
var _state$elements = state.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper;
Similar blocks of code found in 2 locations. Consider refactoring. Open
}, d.prototype.decreaseNestingLevel = function() {
var t3;
if (t3 = this.getBlock())
return this.setDocument(this.document.replaceBlock(t3, t3.decreaseNestingLevel()));
}, d.prototype.increaseNestingLevel = function() {
- 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 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
- 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
}, d.prototype.increaseNestingLevel = function() {
var t3;
if (t3 = this.getBlock())
return this.setDocument(this.document.replaceBlock(t3, t3.increaseNestingLevel()));
}, d.prototype.canDecreaseBlockAttributeLevel = function() {
- 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 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
- 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
}, c.prototype.attachmentEditorDidRequestRemovalOfAttachment = function(t3) {
var e2;
return (e2 = this.delegate) != null && typeof e2.compositionControllerDidRequestRemovalOfAttachment == "function" ? e2.compositionControllerDidRequestRemovalOfAttachment(t3) : void 0;
}, c.prototype.attachmentEditorDidRequestDeselectingAttachment = function(t3) {
- 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 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
- 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
}, d.prototype.notifyDelegateOfInsertionAtRange = function(t3) {
var e2;
return (e2 = this.delegate) != null && typeof e2.compositionDidPerformInsertionAtRange == "function" ? e2.compositionDidPerformInsertionAtRange(t3) : void 0;
}, d.prototype.translateUTF16PositionFromOffset = function(t3, e2) {
- 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 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
- 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
}, c.prototype.attachmentEditorDidRequestDeselectingAttachment = function(t3) {
var e2;
return (e2 = this.delegate) != null && typeof e2.compositionControllerDidRequestDeselectingAttachment == "function" ? e2.compositionControllerDidRequestDeselectingAttachment(t3) : void 0;
}, c.prototype.canSyncDocumentView = function() {
- 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 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
- 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
Consider simplifying this complex logical expression. Open
if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
( support.htmlSerialize || !rnoshimcache.test( value ) ) &&
( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
Consider simplifying this complex logical expression. Open
if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || ["transform", "perspective"].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === "filter" || isFirefox && css.filter && css.filter !== "none") {
return currentNode;
} else {
currentNode = currentNode.parentNode;
}
Consider simplifying this complex logical expression. Open
function _setup(t,i){this.$element=t;this.options=e.extend({},Tooltip.defaults,this.$element.data(),i);this.className="Tooltip";this.isActive=false;this.isClick=false;k.init(e);this._init()}},{key:"_init",value:function _init(){i._init();var t=this.$element.attr("aria-describedby")||GetYoDigits(6,"tooltip");this.options.tipText=this.options.tipText||this.$element.attr("title");this.template=this.options.template?e(this.options.template):this._buildTemplate(t);this.options.allowHtml?this.template.appendTo(document.body).html(this.options.tipText).hide():this.template.appendTo(document.body).text(this.options.tipText).hide();this.$element.attr({title:"","aria-describedby":t,"data-yeti-box":t,"data-toggle":t,"data-resize":t}).addClass(this.options.triggerClass);_get(_getPrototypeOf(Tooltip.prototype),"_init",this).call(this);this._events()}},{key:"_getDefaultPosition",value:function _getDefaultPosition(){var e=this.$element[0].className;this.$element[0]instanceof SVGElement&&(e=e.baseVal);var t=e.match(/\b(top|left|right|bottom)\b/g);return t?t[0]:"top"}},{key:"_getDefaultAlignment",value:function _getDefaultAlignment(){return"center"}},{key:"_getHOffset",value:function _getHOffset(){return"left"===this.position||"right"===this.position?this.options.hOffset+this.options.tooltipWidth:this.options.hOffset}},{key:"_getVOffset",value:function _getVOffset(){return"top"===this.position||"bottom"===this.position?this.options.vOffset+this.options.tooltipHeight:this.options.vOffset}},{key:"_buildTemplate",value:function _buildTemplate(t){var i="".concat(this.options.tooltipClass," ").concat(this.options.templateClasses).trim();var n=e("<div></div>").addClass(i).attr({role:"tooltip","aria-hidden":true,"data-is-active":false,"data-is-focus":false,id:t});return n}},{key:"_setPosition",value:function _setPosition(){_get(_getPrototypeOf(Tooltip.prototype),"_setPosition",this).call(this,this.$element,this.template)}},{key:"show",value:function show(){if("all"!==this.options.showOn&&!i.is(this.options.showOn))return false;var e=this;this.template.css("visibility","hidden").show();this._setPosition();this.template.removeClass("top bottom left right").addClass(this.position);this.template.removeClass("align-top align-bottom align-left align-right align-center").addClass("align-"+this.alignment);this.$element.trigger("closeme.zf.tooltip",this.template.attr("id"));this.template.attr({"data-is-active":true,"aria-hidden":false});e.isActive=true;this.template.stop().hide().css("visibility","").fadeIn(this.options.fadeInDuration,(function(){}));this.$element.trigger("show.zf.tooltip")}},{key:"hide",value:function hide(){var e=this;this.template.stop().attr({"aria-hidden":true,"data-is-active":false}).fadeOut(this.options.fadeOutDuration,(function(){e.isActive=false;e.isClick=false}));this.$element.trigger("hide.zf.tooltip")}},{key:"_events",value:function _events(){var e=this;var t="ontouchstart"in window||"undefined"!==typeof window.ontouchstart;var i=false;if(!t||!this.options.disableForTouch){this.options.disableHover||this.$element.on("mouseenter.zf.tooltip",(function(){e.isActive||(e.timeout=setTimeout((function(){e.show()}),e.options.hoverDelay))})).on("mouseleave.zf.tooltip",ignoreMousedisappear((function(){clearTimeout(e.timeout);(!i||e.isClick&&!e.options.clickOpen)&&e.hide()})));t&&this.$element.on("tap.zf.tooltip touchend.zf.tooltip",(function(){e.isActive?e.hide():e.show()}));this.options.clickOpen?this.$element.on("mousedown.zf.tooltip",(function(){if(e.isClick);else{e.isClick=true;!e.options.disableHover&&e.$element.attr("tabindex")||e.isActive||e.show()}})):this.$element.on("mousedown.zf.tooltip",(function(){e.isClick=true}));this.$element.on({"close.zf.trigger":this.hide.bind(this)});this.$element.on("focus.zf.tooltip",(function(){i=true;if(e.isClick){e.options.clickOpen||(i=false);return false}e.show()})).on("focusout.zf.tooltip",(function(){i=false;e.isClick=false;e.hide()})).on("resizeme.zf.trigger",(function(){e.isActive&&e._setPosition()}))}}},{key:"toggle",value:function toggle(){this.isActive?this.hide():this.show()}},{key:"_destroy",value:function _destroy(){this.$element.attr("title",this.template.text()).off(".zf.trigger .zf.tooltip").removeClass(this.options.triggerClass).removeClass("top right left bottom").removeAttr("aria-describedby data-disable-hover data-resize data-toggle data-tooltip data-yeti-box");this.template.remove()}}]);return Tooltip}(R);Q.defaults={
Consider simplifying this complex logical expression. Open
else if (relUrl[0] === '.' && (relUrl[1] === '/' || relUrl[1] === '.' && (relUrl[2] === '/' || relUrl.length === 2 && (relUrl += '/')) ||
relUrl.length === 1 && (relUrl += '/')) ||
relUrl[0] === '/') {
const parentProtocol = parentUrl.slice(0, parentUrl.indexOf(':') + 1);
// Disabled, but these cases will give inconsistent results for deep backtracking
Consider simplifying this complex logical expression. Open
*/},{key:"_enableScroll",value:function _enableScroll(t){t=t||parseInt(e("html").css("top"),10);if(e(document).height()>e(window).height()){e("html").css("top","");e(window).scrollTop(-t)}}},{key:"open",value:function open(){var t=this;var i="#".concat(this.id);this.options.deepLink&&window.location.hash!==i&&(window.history.pushState?this.options.updateHistory?window.history.pushState({},"",i):window.history.replaceState({},"",i):window.location.hash=i);this.$activeAnchor=e(document.activeElement).is(this.$anchor)?e(document.activeElement):this.$anchor;this.isActive=true;this.$element.css({visibility:"hidden"}).show().scrollTop(0);this.options.overlay&&this.$overlay.css({visibility:"hidden"}).show();this._updatePosition();this.$element.hide().css({visibility:""});if(this.$overlay){this.$overlay.css({visibility:""}).hide();this.$element.hasClass("fast")?this.$overlay.addClass("fast"):this.$element.hasClass("slow")&&this.$overlay.addClass("slow")}this.options.multipleOpened||this.$element.trigger("closeme.zf.reveal",this.id);0===e(".reveal:visible").length&&this._disableScroll();var n=this;if(this.options.animationIn){var s=function afterAnimation(){n.$element.attr({"aria-hidden":false,tabindex:-1}).focus();n._addGlobalClasses();l.trapFocus(n.$element)};this.options.overlay&&d.animateIn(this.$overlay,"fade-in");d.animateIn(this.$element,this.options.animationIn,(function(){if(t.$element){t.focusableElements=l.findFocusable(t.$element);s()}}))}else{this.options.overlay&&this.$overlay.show(0);this.$element.show(this.options.showDelay)}this.$element.attr({"aria-hidden":false,tabindex:-1}).focus();l.trapFocus(this.$element);this._addGlobalClasses();this._addGlobalListeners();this.$element.trigger("open.zf.reveal")}},{key:"_addGlobalClasses",value:function _addGlobalClasses(){var t=function updateScrollbarClass(){e("html").toggleClass("zf-has-scroll",!!(e(document).height()>e(window).height()))};this.$element.on("resizeme.zf.trigger.revealScrollbarListener",(function(){return t()}));t();e("html").addClass("is-reveal-open")}},{key:"_removeGlobalClasses",value:function _removeGlobalClasses(){this.$element.off("resizeme.zf.trigger.revealScrollbarListener");e("html").removeClass("is-reveal-open");e("html").removeClass("zf-has-scroll")}},{key:"_addGlobalListeners",value:function _addGlobalListeners(){var t=this;if(this.$element){this.focusableElements=l.findFocusable(this.$element);this.options.overlay||!this.options.closeOnClick||this.options.fullScreen||e("body").on("click.zf.dropdown tap.zf.dropdown",(function(i){i.target!==t.$element[0]&&!e.contains(t.$element[0],i.target)&&e.contains(document,i.target)&&t.close()}));this.options.closeOnEsc&&e(window).on("keydown.zf.reveal",(function(e){l.handleKey(e,"Reveal",{close:function close(){t.options.closeOnEsc&&t.close()}})}))}}},{key:"close",value:function close(){if(!this.isActive||!this.$element.is(":visible"))return false;var t=this;if(this.options.animationOut){this.options.overlay&&d.animateOut(this.$overlay,"fade-out");d.animateOut(this.$element,this.options.animationOut,finishUp)}else{this.$element.hide(this.options.hideDelay);this.options.overlay?this.$overlay.hide(0,finishUp):finishUp()}this.options.closeOnEsc&&e(window).off("keydown.zf.reveal");!this.options.overlay&&this.options.closeOnClick&&e("body").off("click.zf.dropdown tap.zf.dropdown");this.$element.off("keydown.zf.reveal");function finishUp(){var i=parseInt(e("html").css("top"),10);0===e(".reveal:visible").length&&t._removeGlobalClasses();l.releaseFocus(t.$element);t.$element.attr("aria-hidden",true);0===e(".reveal:visible").length&&t._enableScroll(i);t.$element.trigger("closed.zf.reveal")}this.options.resetOnClose&&this.$element.html(this.$element.html());this.isActive=false;if(t.options.deepLink&&window.location.hash==="#".concat(this.id))if(window.history.replaceState){var i=window.location.pathname+window.location.search;this.options.updateHistory?window.history.pushState({},"",i):window.history.replaceState("",document.title,i)}else window.location.hash="";this.$activeAnchor.focus()}},{key:"toggle",value:function toggle(){this.isActive?this.close():this.open()}},{key:"_destroy",value:function _destroy(){if(this.options.overlay){this.$element.appendTo(e(this.options.appendTo));this.$overlay.hide().off().remove()}this.$element.hide().off();this.$anchor.off(".zf");e(window).off(".zf.reveal:".concat(this.id));this.onLoadListener&&e(window).off(this.onLoadListener);0===e(".reveal:visible").length&&this._removeGlobalClasses()}}]);return Reveal}(C);Y.defaults={
Similar blocks of code found in 2 locations. Consider refactoring. Open
function _setup(t,i){this.$element=t;this.options=e.extend({},Accordion.defaults,this.$element.data(),i);this.className="Accordion";this._init();l.register("Accordion",{ENTER:"toggle",SPACE:"toggle",ARROW_DOWN:"next",ARROW_UP:"previous",HOME:"first",END:"last"})}},{key:"_init",value:function _init(){var t=this;this._isInitializing=true;this.$tabs=this.$element.children("[data-accordion-item]");this.$tabs.each((function(t,i){var n=e(i),s=n.children("[data-tab-content]"),a=s[0].id||GetYoDigits(6,"accordion"),o=i.id?"".concat(i.id,"-label"):"".concat(a,"-label");n.find("a:first").attr({"aria-controls":a,id:o,"aria-expanded":false});s.attr({role:"region","aria-labelledby":o,"aria-hidden":true,id:a})}));var i=this.$element.find(".is-active").children("[data-tab-content]");if(i.length){this._initialAnchor=i.prev("a").attr("href");this._openSingleTab(i)}this._checkDeepLink=function(){var i=window.location.hash;if(!i.length){if(t._isInitializing)return;t._initialAnchor&&(i=t._initialAnchor)}var n=i&&e(i);var s=i&&t.$element.find('[href$="'.concat(i,'"]'));var a=!!(n.length&&s.length);if(a){n&&s&&s.length?s.parent("[data-accordion-item]").hasClass("is-active")||t._openSingleTab(n):t._closeAllTabs();t.options.deepLinkSmudge&&onLoad(e(window),(function(){var i=t.$element.offset();e("html, body").animate({scrollTop:i.top-t.options.deepLinkSmudgeOffset},t.options.deepLinkSmudgeDelay)}));t.$element.trigger("deeplink.zf.accordion",[s,n])}};this.options.deepLink&&this._checkDeepLink();this._events();this._isInitializing=false}},{key:"_events",value:function _events(){var t=this;this.$tabs.each((function(){var i=e(this);var n=i.children("[data-tab-content]");n.length&&i.children("a").off("click.zf.accordion keydown.zf.accordion").on("click.zf.accordion",(function(e){e.preventDefault();t.toggle(n)})).on("keydown.zf.accordion",(function(e){l.handleKey(e,"Accordion",{toggle:function toggle(){t.toggle(n)},next:function next(){var e=i.next().find("a").focus();t.options.multiExpand||e.trigger("click.zf.accordion")},previous:function previous(){var e=i.prev().find("a").focus();t.options.multiExpand||e.trigger("click.zf.accordion")},first:function first(){var e=t.$tabs.first().find(".accordion-title").focus();t.options.multiExpand||e.trigger("click.zf.accordion")},last:function last(){var e=t.$tabs.last().find(".accordion-title").focus();t.options.multiExpand||e.trigger("click.zf.accordion")},handled:function handled(){e.preventDefault()}})}))}));this.options.deepLink&&e(window).on("hashchange",this._checkDeepLink)}
- 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 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
- 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
}}, alt: {backspace: function() {
var t3;
return this.setInputSummary({preferDocument: false}), (t3 = this.delegate) != null ? t3.inputControllerWillPerformTyping() : void 0;
}}, meta: {backspace: function() {
- 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 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
- 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
}}, meta: {backspace: function() {
var t3;
return this.setInputSummary({preferDocument: false}), (t3 = this.delegate) != null ? t3.inputControllerWillPerformTyping() : void 0;
}}}, s2.prototype.getCompositionInput = function() {
- 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 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
- 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
e.config.blockAttributes = t2 = {default: {tagName: "div", parse: false}, quote: {tagName: "blockquote", nestable: true}, heading1: {tagName: "h1", terminal: true, breakOnReturn: true, group: false}, code: {tagName: "pre", terminal: true, text: {plaintext: true}}, bulletList: {tagName: "ul", parse: false}, bullet: {tagName: "li", listAttribute: "bulletList", group: false, nestable: true, test: function(n) {
return e.tagName(n.parentNode) === t2[this.listAttribute].tagName;
}}, numberList: {tagName: "ol", parse: false}, number: {tagName: "li", listAttribute: "numberList", group: false, nestable: true, test: function(n) {
- 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 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
- 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
}}, numberList: {tagName: "ol", parse: false}, number: {tagName: "li", listAttribute: "numberList", group: false, nestable: true, test: function(n) {
return e.tagName(n.parentNode) === t2[this.listAttribute].tagName;
}}, attachmentGallery: {tagName: "div", exclusive: true, terminal: true, parse: false, group: false}};
- 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 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
- 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
Function stop
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
stop: function( type, clearQueue, gotoEnd ) {
var stopQueue = function( hooks ) {
var stop = hooks.stop;
delete hooks.stop;
stop( gotoEnd );
Function extend
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.extend = jQuery.fn.extend = function() {
var src, copyIsArray, copy, name, options, clone,
target = arguments[ 0 ] || {},
i = 1,
length = arguments.length,
Function initPromise
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
const initPromise = featureDetectionPromise.then(() => {
baselinePassthrough = esmsInitOptions.polyfillEnable !== true && supportsDynamicImport && supportsImportMeta && supportsImportMaps && (!jsonModulesEnabled || supportsJsonAssertions) && (!cssModulesEnabled || supportsCssAssertions) && !importMapSrcOrLazy && !false;
if (hasDocument) {
if (!supportsImportMaps) {
const supports = HTMLScriptElement.supports || (type => type === 'classic' || type === 'module');