Showing 373 of 373 total issues
Function makeChangeFromHistory
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
function makeChangeFromHistory(e, t, r) {
if (!e.cm || !e.cm.state.suppressEdits || r) {
for (
var n,
o = e.history,
Similar blocks of code found in 2 locations. Consider refactoring. Open
(ce.prototype.setScrollLeft = function(e) {
this.horiz.scrollLeft != e && (this.horiz.scrollLeft = e),
this.disableHoriz &&
this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz")
}),
- 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 79.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- 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
(ce.prototype.setScrollTop = function(e) {
this.vert.scrollTop != e && (this.vert.scrollTop = e),
this.disableVert &&
this.enableZeroWidthBar(this.vert, this.disableVert, "vert")
}),
- 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 79.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- 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 highlightLine
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function highlightLine(e, t, r, n) {
var o = [e.state.modeGen],
i = {}
runMode(
e,
Function showPrimarySelection
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
(Ve.prototype.showPrimarySelection = function() {
var e = window.getSelection(),
t = this.cm,
n = t.doc.sel.primary(),
o = n.from(),
Function inText
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function inText(e, t) {
function chain(r) {
return (t.tokenize = r), r(e, t)
}
var r = e.next()
Function init
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
;(_e.prototype.init = function(e) {
var t = this,
r = this,
n = this.cm,
o = (this.wrapper = hiddenTextarea()),
Identical blocks of code found in 2 locations. Consider refactoring. Open
(this.props.defineMode &&
this.props.defineMode.name &&
this.props.defineMode.fn &&
o.defineMode(
this.props.defineMode.name,
- 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 78.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- 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
Identical blocks of code found in 2 locations. Consider refactoring. Open
(this.props.defineMode &&
this.props.defineMode.name &&
this.props.defineMode.fn &&
o.defineMode(
this.props.defineMode.name,
- 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 78.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- 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 highlightWorker
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function highlightWorker(e) {
var t = e.doc
if (!(t.highlightFrontier >= e.display.viewTo)) {
var r = +new Date() + e.options.workTime,
n = getContextBefore(e, t.highlightFrontier),
Function c
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
c = (function() {
function kw(e) {
return { type: e, style: "keyword" }
}
var e = kw("keyword a"),
Function xmlToken
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
? (function xmlToken(r, i, s) {
if (2 == s.depth)
return (
r.match(/^.*?\*\//) ? (s.depth = 1) : r.skipToEnd(),
"comment"
Function poll
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
(_e.prototype.poll = function() {
var e = this,
t = this.cm,
r = this.textarea,
n = this.prevInput
Function applyTextInput
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function applyTextInput(e, t, r, n, o) {
var i = e.doc
;(e.display.shift = !1), n || (n = i.sel)
var s = e.state.pasteIncoming || "paste" == o,
a = G(t),
Consider simplifying this complex logical expression. Open
if (
!((u >= 0 && d <= 0) || (u <= 0 && d >= 0)) &&
((u <= 0 &&
(l.marker.inclusiveRight && o.inclusiveLeft
? cmp(c.to, r) >= 0
Function onScrollWheel
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
function onScrollWheel(e, t) {
var n = wheelEventDelta(t),
o = n.x,
i = n.y,
s = e.display,
Consider simplifying this complex logical expression. Open
else if (!(t.from.line > e.lastLine())) {
if (t.from.line < e.first) {
var o = t.text.length - 1 - (e.first - t.from.line)
shiftDoc(e, o),
(t = {
Function indent
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
indent: function(t, i) {
if (t.tokenize == tokenComment) return e.Pass
if (t.tokenize != tokenBase) return 0
var s,
a = i && i.charAt(0),
Function leftButtonStartDrag
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
? (function leftButtonStartDrag(e, t, r, n) {
var o = e.display,
i = !1,
c = operation(e, function(t) {
l && (o.scroller.draggable = !1),
Similar blocks of code found in 2 locations. Consider refactoring. Open
(UnControlled.prototype.moveCursor = function(e, t) {
var r = this.editor.getDoc()
t ? r.setCursor(e) : r.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 73.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- 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