Showing 259 of 373 total issues
Function measureCharPrepared
has 137 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function measureCharPrepared(e, t, r, n, o) {
t.before && (r = -1)
var i,
l = r + (n || "")
return (
Consider simplifying this complex logical expression. Open
Open
if (
(this.props.defineMode &&
this.props.defineMode.name &&
this.props.defineMode.fn &&
o.defineMode(
Function pollContent
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(Ve.prototype.pollContent = function() {
null != this.readDOMTimeout &&
(clearTimeout(this.readDOMTimeout), (this.readDOMTimeout = null))
var e = this.cm,
t = e.display,
Function ./node_modules/react-styleguidist/lib/rsg-components/Editor/Editor.js
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
"./node_modules/react-styleguidist/lib/rsg-components/Editor/Editor.js": function(
e,
t,
r
) {
Consider simplifying this complex logical expression. Open
Open
if (!this.explicitlyCleared) {
var e = this.doc.cm,
t = e && !e.curOp
if ((t && startOperation(e), hasHandler(this, "clear"))) {
var r = this.find()
Function statement
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function statement(e, t) {
return "var" == e
? cont(pushlex("vardef", t.length), vardef, expect(";"), poplex)
: "keyword a" == e
? cont(pushlex("form"), parenExpr, statement, poplex)
Function ./node_modules/react-styleguidist/lib/rsg-components/Editor/Editor.js
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
Open
"./node_modules/react-styleguidist/lib/rsg-components/Editor/Editor.js": function(
e,
t,
r
) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function findPosH
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function findPosH(e, t, r, n, o) {
var i = t,
s = r,
a = getLine(e, t.line)
function moveOnce(n) {
Function drawSelectionRange
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function drawSelectionRange(e, t, r) {
var n = e.display,
o = e.doc,
i = document.createDocumentFragment(),
s = paddingH(e.display),
Function coordsCharInner
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function coordsCharInner(e, t, r, n, o) {
o -= heightAtLine(t)
var i = prepareMeasureForLine(e, t),
s = widgetTopHeight(t),
a = 0,
Function z
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var z = (function() {
var e =
"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",
t =
"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111"
Function extendTo
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function extendTo(t) {
if (0 != cmp(d, t))
if (((d = t), "rectangle" == n.unit)) {
for (
var o = [],
Function markText
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function markText(e, t, r, n, o) {
if (n && n.shared)
return (function markTextShared(e, t, r, n, o) {
;(n = copyObj(n)).shared = !1
var i = [markText(e, t, r, n, o)],
Function endOperation_finish
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function endOperation_finish(e) {
var t = e.cm,
r = t.display,
n = t.doc
if (
Function a
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var a = (function() {
function Shared(e, t) {
;(this.editor = e), (this.props = t), this.notifyOfDeprecation()
}
return (
Function measureCharInner
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(i = (function measureCharInner(e, t, r, n) {
var o,
i = nodeAndOffsetInLineMap(t.map, r, n),
l = i.node,
c = i.start,
Function makeChangeSingleDoc
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
Open
function moveOnce(n) {
var i
if (
null ==
(i = o
Consider simplifying this complex logical expression. Open
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
Open
function insertLineContent(e, t, r) {
var n = e.markedSpans,
o = e.text,
i = 0
if (n)