tomchentw/react-prism

View on GitHub

Showing 259 of 373 total issues

Function measureCharPrepared has 137 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function measureCharPrepared(e, t, r, n, o) {
        t.before && (r = -1)
        var i,
          l = r + (n || "")
        return (
Severity: Major
Found in docs/build/0.355cdadd.js - About 5 hrs to fix

    Consider simplifying this complex logical expression.
    Open

                if (
                  (this.props.defineMode &&
                    this.props.defineMode.name &&
                    this.props.defineMode.fn &&
                    o.defineMode(
    Severity: Critical
    Found in docs/build/0.355cdadd.js - About 5 hrs to fix

      Function pollContent has 129 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              (Ve.prototype.pollContent = function() {
                null != this.readDOMTimeout &&
                  (clearTimeout(this.readDOMTimeout), (this.readDOMTimeout = null))
                var e = this.cm,
                  t = e.display,
      Severity: Major
      Found in docs/build/0.355cdadd.js - About 5 hrs to fix

        Function ./node_modules/react-styleguidist/lib/rsg-components/Editor/Editor.js has 128 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          "./node_modules/react-styleguidist/lib/rsg-components/Editor/Editor.js": function(
            e,
            t,
            r
          ) {
        Severity: Major
        Found in docs/build/0.355cdadd.js - About 5 hrs to fix

          Consider simplifying this complex logical expression.
          Open

                  if (!this.explicitlyCleared) {
                    var e = this.doc.cm,
                      t = e && !e.curOp
                    if ((t && startOperation(e), hasHandler(this, "clear"))) {
                      var r = this.find()
          Severity: Critical
          Found in docs/build/0.355cdadd.js - About 5 hrs to fix

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

              Function ./node_modules/react-styleguidist/lib/rsg-components/Editor/Editor.js has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
              Open

                "./node_modules/react-styleguidist/lib/rsg-components/Editor/Editor.js": function(
                  e,
                  t,
                  r
                ) {
              Severity: Minor
              Found in docs/build/0.355cdadd.js - About 4 hrs to fix

              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

                    function findPosH(e, t, r, n, o) {
                      var i = t,
                        s = r,
                        a = getLine(e, t.line)
                      function moveOnce(n) {
              Severity: Major
              Found in docs/build/0.355cdadd.js - About 4 hrs to fix

                Function drawSelectionRange has 117 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      function drawSelectionRange(e, t, r) {
                        var n = e.display,
                          o = e.doc,
                          i = document.createDocumentFragment(),
                          s = paddingH(e.display),
                Severity: Major
                Found in docs/build/0.355cdadd.js - About 4 hrs to fix

                  Function coordsCharInner has 116 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        function coordsCharInner(e, t, r, n, o) {
                          o -= heightAtLine(t)
                          var i = prepareMeasureForLine(e, t),
                            s = widgetTopHeight(t),
                            a = 0,
                  Severity: Major
                  Found in docs/build/0.355cdadd.js - About 4 hrs to fix

                    Function z has 115 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          var z = (function() {
                            var e =
                                "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",
                              t =
                                "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111"
                    Severity: Major
                    Found in docs/build/0.355cdadd.js - About 4 hrs to fix

                      Function extendTo has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                                    function extendTo(t) {
                                                      if (0 != cmp(d, t))
                                                        if (((d = t), "rectangle" == n.unit)) {
                                                          for (
                                                            var o = [],
                      Severity: Major
                      Found in docs/build/0.355cdadd.js - About 4 hrs to fix

                        Function markText has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                        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)],
                        Severity: Major
                        Found in docs/build/0.355cdadd.js - About 4 hrs to fix

                          Function endOperation_finish has 108 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                function endOperation_finish(e) {
                                  var t = e.cm,
                                    r = t.display,
                                    n = t.doc
                                  if (
                          Severity: Major
                          Found in docs/build/0.355cdadd.js - About 4 hrs to fix

                            Function a has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                var a = (function() {
                                    function Shared(e, t) {
                                      ;(this.editor = e), (this.props = t), this.notifyOfDeprecation()
                                    }
                                    return (
                            Severity: Major
                            Found in docs/build/0.355cdadd.js - About 4 hrs to fix

                              Function measureCharInner has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                            (i = (function measureCharInner(e, t, r, n) {
                                              var o,
                                                i = nodeAndOffsetInLineMap(t.map, r, n),
                                                l = i.node,
                                                c = i.start,
                              Severity: Major
                              Found in docs/build/0.355cdadd.js - About 3 hrs to fix

                                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
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language