tomchentw/react-prism

View on GitHub

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))
Severity: Major
Found in docs/build/0.355cdadd.js - About 3 hrs to fix

    Function moveOnce has 92 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function moveOnce(n) {
              var i
              if (
                null ==
                (i = o
    Severity: Major
    Found in docs/build/0.355cdadd.js - About 3 hrs to fix

      Consider simplifying this complex logical expression.
      Open

              if (
                (e.iter(l, r.line + 1, function(e) {
                  c &&
                    i.collapsed &&
                    !c.options.lineWrapping &&
      Severity: Critical
      Found in docs/build/0.355cdadd.js - About 3 hrs to fix

        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)
        Severity: Major
        Found in docs/build/0.355cdadd.js - About 3 hrs to fix

          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
          Severity: Major
          Found in docs/build/0.355cdadd.js and 1 other location - About 3 hrs to fix
          docs/build/0.355cdadd.js on lines 11435..11447

          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

          Further Reading

          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
          Severity: Major
          Found in docs/build/0.355cdadd.js and 1 other location - About 3 hrs to fix
          docs/build/0.355cdadd.js on lines 11583..11595

          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

          Further Reading

          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
          Severity: Major
          Found in docs/build/0.355cdadd.js - About 3 hrs to fix

            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,
            Severity: Major
            Found in docs/build/0.355cdadd.js - About 3 hrs to fix

              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)
              Severity: Critical
              Found in docs/build/0.355cdadd.js - About 3 hrs to fix

                Consider simplifying this complex logical expression.
                Open

                        if (
                          (o.lastOp == n ||
                            (o.lastOrigin == t.origin &&
                              t.origin &&
                              (("+" == t.origin.charAt(0) &&
                Severity: Critical
                Found in docs/build/0.355cdadd.js - About 3 hrs to fix

                  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,
                  Severity: Major
                  Found in docs/build/0.355cdadd.js - About 3 hrs to fix

                    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,
                    Severity: Major
                    Found in docs/build/0.355cdadd.js and 1 other location - About 3 hrs to fix
                    docs/build/0.355cdadd.js on lines 3017..3022

                    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

                    Further Reading

                    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,
                    Severity: Major
                    Found in docs/build/0.355cdadd.js and 1 other location - About 3 hrs to fix
                    docs/build/0.355cdadd.js on lines 3447..3452

                    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

                    Further Reading

                    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 (
                    Severity: Major
                    Found in docs/build/0.355cdadd.js - About 3 hrs to fix

                      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))
                      Severity: Major
                      Found in docs/build/0.355cdadd.js - About 3 hrs to fix

                        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) {
                        Severity: Major
                        Found in docs/build/0.355cdadd.js - About 3 hrs to fix

                          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) {
                          Severity: Major
                          Found in docs/build/0.355cdadd.js - About 3 hrs to fix

                            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) {
                            Severity: Major
                            Found in docs/build/0.355cdadd.js - About 3 hrs to fix

                              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 &&
                              Severity: Major
                              Found in docs/build/0.355cdadd.js - About 2 hrs to fix

                                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 })
                                        }),
                                Severity: Major
                                Found in docs/build/0.355cdadd.js and 1 other location - About 2 hrs to fix
                                docs/build/0.355cdadd.js on lines 11275..11279

                                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

                                Further Reading

                                Severity
                                Category
                                Status
                                Source
                                Language