Showing 289 of 289 total issues
Function coordsBidiPart
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function coordsBidiPart(e, t, n, r, o, i, a) {
var s = findFirst(
function(s) {
var l = o[s],
c = 1 != l.level
Function addLineWidget
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addLineWidget(e, t, n, r) {
var o = new ye(e, n, r),
i = e.cm
return (
i && o.noHScroll && (i.display.alignWidgets = !0),
Function findFatArrow
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function findFatArrow(e, t) {
t.fatArrowAt && (t.fatArrowAt = null)
var n = e.string.indexOf("=>", e.start)
if (!(n < 0)) {
if (c) {
Function maybeoperatorNoComma
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function maybeoperatorNoComma(e, t, n) {
var r = 0 == n ? maybeoperatorComma : maybeoperatorNoComma,
o = 0 == n ? expression : expressionNoComma
return "=>" == e
? cont(pushcontext, n ? arrowBodyNoComma : arrowBody, popcontext)
Function maybeScrollWindow
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function maybeScrollWindow(e, t) {
if (!signalDOMEvent(e, "scrollCursorIntoView")) {
var n = e.display,
r = n.sizer.getBoundingClientRect(),
o = null
Function indent
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
indent: function(t, n, r) {
var o = t.context
if (t.tokenize.isInAttribute)
return t.tagStart == t.indented
? t.stringStartCol + 1
Function removeReadOnlyRanges
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function removeReadOnlyRanges(e, t, n) {
var r = null
if (
(e.iter(t.line, n.line + 1, function(e) {
if (e.markedSpans)
Function posFromMouse
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function posFromMouse(e, t, n, r) {
var o = e.display
if (!n && "true" == e_target(t).getAttribute("cm-not-content"))
return null
var i,
Function endOperation_finish
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function endOperation_finish(e) {
var t = e.cm,
n = t.display,
r = t.doc
e.updatedDisplay && postUpdateDisplay(t, e.update),
Similar blocks of code found in 2 locations. Consider refactoring. Open
;(r.teTop = Math.max(
0,
Math.min(t.wrapper.clientHeight - 10, o.top + a.top - i.top)
)),
- 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 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
- 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
(null != c.scrollTop &&
(updateScrollTop(e, c.scrollTop),
Math.abs(e.doc.scrollTop - u) > 1 && (a = !0)),
- 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 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
- 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
null != c.scrollLeft &&
(setScrollLeft(e, c.scrollLeft),
Math.abs(e.doc.scrollLeft - d) > 1 && (a = !0)),
- 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 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
- 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
(r.teLeft = Math.max(
0,
Math.min(t.wrapper.clientWidth - 10, o.left + a.left - i.left)
))
- 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 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
- 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 inText
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function inText(e, t) {
function chain(n) {
return (t.tokenize = n), n(e, t)
}
var n = e.next()
Function l
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
l = function(e, r) {
if (
!t.options.allowDropFileTypes ||
-1 != indexOf(t.options.allowDropFileTypes, e.type)
) {
Function handleNotify
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
handleNotify(type, message, title, optionsOverride = {}) {
if (
this.props.preventDuplicates &&
_.includes(this.state.toastList, { message })
) {
Function update
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
;(ce.prototype.update = function(e) {
var t = e.scrollWidth > e.clientWidth + 1,
n = e.scrollHeight > e.clientHeight + 1,
r = e.nativeBarWidth
if (n) {
Function removeInner
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
removeInner: function removeInner(e, t) {
var n = this
this.size -= t
for (var r = 0; r < this.children.length; ++r) {
var o = n.children[r],
Function makeChangeSingleDoc
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function makeChangeSingleDoc(e, t, n, r) {
if (e.cm && !e.cm.curOp)
return operation(e.cm, makeChangeSingleDoc)(e, t, n, r)
if (t.to.line < e.first)
shiftDoc(e, t.text.length - 1 - (t.to.line - t.from.line))
Function normalizeKeyMap
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function normalizeKeyMap(e) {
var t = {}
for (var n in e)
if (e.hasOwnProperty(n)) {
var r = e[n]