Showing 373 of 373 total issues
Function makeChangeSingleDoc
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
function makeChangeSingleDoc(e, t, r, n) {
if (e.cm && !e.cm.curOp)
return operation(e.cm, makeChangeSingleDoc)(e, t, r, n)
if (t.to.line < e.first)
shiftDoc(e, t.text.length - 1 - (t.to.line - t.from.line))
Function moveOnce
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
function moveOnce(n) {
var i
if (
null ==
(i = o
Consider simplifying this complex logical expression. Open
if (
(e.iter(l, r.line + 1, function(e) {
c &&
i.collapsed &&
!c.options.lineWrapping &&
Function insertLineContent
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
function insertLineContent(e, t, r) {
var n = e.markedSpans,
o = e.text,
i = 0
if (n)
Similar blocks of code found in 2 locations. Consider refactoring. Open
(UnControlled.prototype.render = function() {
var e = this
if (s) return null
var t = this.props.className
? "react-codemirror2 " + this.props.className
- 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 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
- 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
(Controlled.prototype.render = function() {
var e = this
if (s) return null
var t = this.props.className
? "react-codemirror2 " + this.props.className
- 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 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
- 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 stretchSpansOverChange
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
function stretchSpansOverChange(e, t) {
if (t.full) return null
var r = isLine(e, t.from.line) && getLine(e, t.from.line).markedSpans,
n = isLine(e, t.to.line) && getLine(e, t.to.line).markedSpans
if (!r && !n) return null
Function Display
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
c = (this.display = new function Display(e, t, n) {
;(this.input = n),
(this.scrollbarFiller = elt(
"div",
null,
Consider simplifying this complex logical expression. Open
if (((this.curOp.focus = activeElt()), !signalDOMEvent(this, e))) {
s && a < 11 && 27 == e.keyCode && (e.returnValue = !1)
var t = e.keyCode
this.display.shift = 16 == t || e.shiftKey
var r = handleKeyBinding(this, e)
Consider simplifying this complex logical expression. Open
if (
(o.lastOp == n ||
(o.lastOrigin == t.origin &&
t.origin &&
(("+" == t.origin.charAt(0) &&
Function onContextMenu
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
(_e.prototype.onContextMenu = function(e) {
var t = this,
r = t.cm,
n = r.display,
o = t.textarea,
Similar blocks of code found in 2 locations. Consider refactoring. Open
(o = {
left: Math.min(a.left, l.left),
top: Math.min(a.top, l.top) - n,
right: Math.max(a.left, l.left),
bottom: Math.max(a.bottom, l.bottom) + 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 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
- 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
var o = calculateScrollPos(e, {
left: Math.min(t.left, r.left),
top: Math.min(t.top, r.top) - n,
right: Math.max(t.right, r.right),
bottom: Math.max(t.bottom, r.bottom) + 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 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
- 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 token
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
function token(r, i) {
return i.context.mode == n
? (function xmlToken(r, i, s) {
if (2 == s.depth)
return (
Function onDrop
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
function onDrop(e) {
var t = this
if (
(clearDragCursor(t),
!signalDOMEvent(t, e) && !eventInWidget(t.display, e))
Function wire
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
(Shared.prototype.wire = function(e) {
var t = this
switch (e) {
case "onBlur":
this.editor.on("blur", function(e, r) {
Function buildToken
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
function buildToken(e, t, r, n, o, i, l) {
if (t) {
var c,
u = e.splitSpaces
? (function splitSpaces(e, t) {
Function tokenBase
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
function tokenBase(e, t) {
var r = e.next()
if ('"' == r || "'" == r)
return (
(t.tokenize = (function tokenString(e) {
Function componentDidMount
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
(Controlled.prototype.componentDidMount = function() {
var e = this
if (!s) {
if (
(this.props.defineMode &&
Similar blocks of code found in 2 locations. Consider refactoring. Open
(UnControlled.prototype.setCursor = function(e, t, r) {
var n = this.editor.getDoc()
r && this.editor.focus(),
t ? n.setCursor(e) : n.setCursor(e, null, { scroll: !1 })
}),
- 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 92.
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