Showing 289 of 289 total issues
Function ./node_modules/codemirror/lib/codemirror.js
has 9400 lines of code (exceeds 25 allowed). Consider refactoring. Open
"./node_modules/codemirror/lib/codemirror.js": function(e, t, n) {
!(function(t, n) {
e.exports = n()
})(0, function() {
"use strict"
File 0.320b8cca.js
has 11398 lines of code (exceeds 250 allowed). Consider refactoring. Open
webpackJsonp([0], {
"./node_modules/codemirror/lib/codemirror.js": function(e, t, n) {
!(function(t, n) {
e.exports = n()
})(0, function() {
Function ./node_modules/codemirror/mode/javascript/javascript.js
has a Cognitive Complexity of 1591 (exceeds 5 allowed). Consider refactoring. Open
"./node_modules/codemirror/mode/javascript/javascript.js": function(e, t, n) {
!(function(e) {
e(n("./node_modules/codemirror/lib/codemirror.js"))
})(function(e) {
"use strict"
- 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 ./node_modules/codemirror/mode/javascript/javascript.js
has 1036 lines of code (exceeds 25 allowed). Consider refactoring. Open
"./node_modules/codemirror/mode/javascript/javascript.js": function(e, t, n) {
!(function(e) {
e(n("./node_modules/codemirror/lib/codemirror.js"))
})(function(e) {
"use strict"
Function ./node_modules/codemirror/mode/xml/xml.js
has 365 lines of code (exceeds 25 allowed). Consider refactoring. Open
"./node_modules/codemirror/mode/xml/xml.js": function(e, t, n) {
!(function(e) {
e(n("./node_modules/codemirror/lib/codemirror.js"))
})(function(e) {
"use strict"
Function ./node_modules/react-codemirror2/index.js
has 262 lines of code (exceeds 25 allowed). Consider refactoring. Open
"./node_modules/react-codemirror2/index.js": function(e, t, n) {
"use strict"
function _classCallCheck(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
Function defineOptions
has 227 lines of code (exceeds 25 allowed). Consider refactoring. Open
(function defineOptions(e) {
function option(n, r, o, i) {
;(e.defaults[n] = r),
o &&
(t[n] = i
Function a
has 207 lines of code (exceeds 25 allowed). Consider refactoring. Open
a = (function(e) {
function CodeMirror(e) {
_classCallCheck(this, CodeMirror)
var t = _possibleConstructorReturn(
this,
Consider simplifying this complex logical expression. Open
if (v == f) {
;(l = c = u = d = s = ""), (p = null), (v = 1 / 0)
for (var y = [], b = void 0, x = 0; x < r.length; ++x) {
var C = r[x],
w = C.marker
Similar blocks of code found in 2 locations. Consider refactoring. Open
h = (function() {
function defineProperties(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n]
;(r.enumerable = r.enumerable || !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 169.
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 r = (function() {
function defineProperties(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n]
;(r.enumerable = r.enumerable || !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 169.
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 ./node_modules/react-codemirror2/index.js
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
"./node_modules/react-codemirror2/index.js": function(e, t, n) {
"use strict"
function _classCallCheck(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
- 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 registerEventHandlers
has 138 lines of code (exceeds 25 allowed). Consider refactoring. Open
function registerEventHandlers(e) {
function finishTouch() {
t.activeTouch &&
((n = setTimeout(function() {
return (t.activeTouch = null)
Function ./node_modules/codemirror/mode/jsx/jsx.js
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
"./node_modules/codemirror/mode/jsx/jsx.js": function(e, t, n) {
!(function(e) {
e(
n("./node_modules/codemirror/lib/codemirror.js"),
n("./node_modules/codemirror/mode/xml/xml.js"),
Function ./node_modules/react-styleguidist/lib/rsg-components/Editor/Editor.js
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
"./node_modules/react-styleguidist/lib/rsg-components/Editor/Editor.js": function(
e,
t,
n
) {
Similar blocks of code found in 2 locations. Consider refactoring. Open
function _inherits(e, t) {
if ("function" != typeof t && null !== t)
throw new TypeError(
"Super expression must either be null or a function, not " + typeof t
)
- 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 136.
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
function _inherits(e, t) {
if ("function" != typeof t && null !== t)
throw new TypeError(
"Super expression must either be null or a function, not " + typeof t
)
- 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 136.
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 (!this.explicitlyCleared) {
var t = this.doc.cm,
n = t && !t.curOp
if ((n && startOperation(t), hasHandler(this, "clear"))) {
var r = this.find()
Function leftButtonSelect
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
function leftButtonSelect(e, t, n, r) {
function extendTo(t) {
if (0 != cmp(d, t))
if (((d = t), "rectangle" == r.unit)) {
for (
Function statement
has 119 lines of code (exceeds 25 allowed). Consider refactoring. 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)