historyforge/historyforge

View on GitHub

Showing 131 of 347 total issues

Function node_modules/trix/dist/trix.js has 5255 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    "node_modules/trix/dist/trix.js"(exports, module) {
      (function() {
      }).call(exports), function() {
        var t;
        window.Set == null && (window.Set = t = function() {
Severity: Major
Found in app/assets/builds/richtext.js - About 3 wks to fix

    File richtext.js has 6345 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    (() => {
      var __create = Object.create;
      var __defProp = Object.defineProperty;
      var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
      var __getOwnPropNames = Object.getOwnPropertyNames;
    Severity: Major
    Found in app/assets/builds/richtext.js - About 2 wks to fix

      Function node_modules/@rails/activestorage/app/assets/javascripts/activestorage.js has 945 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          "node_modules/@rails/activestorage/app/assets/javascripts/activestorage.js"(exports, module) {
            (function(global, factory) {
              typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : factory(global.ActiveStorage = {});
            })(exports, function(exports2) {
              "use strict";
      Severity: Major
      Found in app/assets/builds/richtext.js - About 4 days to fix

        Function sparkMd5 has 406 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                var sparkMd5 = createCommonjsModule(function(module2, exports3) {
                  (function(factory) {
                    {
                      module2.exports = factory();
                    }
        Severity: Major
        Found in app/assets/builds/richtext.js - About 2 days to fix

          Function Document has 310 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      t2 = e.arraysAreEqual, i = e.normalizeRange, o = e.rangeIsCollapsed, n = e.getBlockConfig, e.Document = function(s2) {
                        function c(t3) {
                          t3 == null && (t3 = []), c.__super__.constructor.apply(this, arguments), t3.length === 0 && (t3 = [new e.Block()]), this.blockList = e.SplittableList.box(t3);
                        }
                        var l;
          Severity: Major
          Found in app/assets/builds/richtext.js - About 1 day to fix

            Function Composition has 279 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                        s = e.normalizeRange, c = e.rangesAreEqual, u = e.rangeIsCollapsed, a = e.objectsAreEqual, t2 = e.arrayStartsWith, l = e.summarizeArrayChange, i = e.getAllAttributeNames, o = e.getBlockConfig, r = e.getTextConfig, n = e.extend, e.Composition = function(p2) {
                          function d() {
                            this.document = new e.Document(), this.attachments = [], this.currentAttributes = {}, this.revision = 0;
                          }
                          var f;
            Severity: Major
            Found in app/assets/builds/richtext.js - About 1 day to fix

              Function Level2InputController has 279 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          t2 = e.dataTransferIsPlainText, n = e.keyEventIsKeyboardCommand, i = e.objectsAreEqual, e.Level2InputController = function(s2) {
                            function u() {
                              return this.render = o(this.render, this), u.__super__.constructor.apply(this, arguments);
                            }
                            var c, l, h, p, d, f;
              Severity: Major
              Found in app/assets/builds/richtext.js - About 1 day to fix

                Function EditorController has 208 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                            i = e.rangeIsCollapsed, o = e.rangesAreEqual, n = e.objectsAreEqual, t2 = e.getBlockConfig, e.EditorController = function(s2) {
                              function u(t3) {
                                var n2, i2;
                                this.editorElement = t3.editorElement, n2 = t3.document, i2 = t3.html, this.selectionManager = new e.SelectionManager(this.editorElement), this.selectionManager.delegate = this, this.composition = new e.Composition(), this.composition.delegate = this, this.attachmentManager = new e.AttachmentManager(this.composition.getAttachments()), this.attachmentManager.delegate = this, this.inputController = new e["Level" + e.config.input.getLevel() + "InputController"](this.editorElement), this.inputController.delegate = this, this.inputController.responder = this.composition, this.compositionController = new e.CompositionController(this.editorElement, this.composition), this.compositionController.delegate = this, this.toolbarController = new e.ToolbarController(this.editorElement.toolbarElement), this.toolbarController.delegate = this, this.editor = new e.Editor(this.composition, this.selectionManager, this.editorElement), n2 != null ? this.editor.loadDocument(n2) : this.editor.loadHTML(i2);
                              }
                Severity: Major
                Found in app/assets/builds/richtext.js - About 1 day to fix

                  Function HTMLParser has 182 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              t2 = e.arraysAreEqual, s = e.makeElement, l = e.tagName, r = e.getBlockTagNames, h = e.walkTree, o = e.findClosestElementFromNode, i = e.elementContainsNode, a = e.nodeIsAttachmentElement, u = e.normalizeSpaces, n = e.breakableWhitespacePattern, c = e.squishBreakableWhitespace, e.HTMLParser = function(d2) {
                                function g(t3, e2) {
                                  this.html = t3, this.referenceElement = (e2 != null ? e2 : {}).referenceElement, this.blocks = [], this.blockElements = [], this.processedElements = [];
                                }
                                var m, v, y, b, A, C, x, w, E, S, R, k;
                  Severity: Major
                  Found in app/assets/builds/richtext.js - About 7 hrs to fix

                    Function Text has 160 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                e.Text = function(n2) {
                                  function i(t3) {
                                    var n3;
                                    t3 == null && (t3 = []), i.__super__.constructor.apply(this, arguments), this.pieceList = new e.SplittableList(function() {
                                      var e2, i2, o;
                    Severity: Major
                    Found in app/assets/builds/richtext.js - About 6 hrs to fix

                      Function Level0InputController has 151 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  c = e.makeElement, l = e.objectsAreEqual, d = e.tagName, n = e.browser, a = e.keyEventIsKeyboardCommand, o = e.dataTransferIsWritable, i = e.dataTransferIsPlainText, u = e.config.keyNames, e.Level0InputController = function(n2) {
                                    function s2() {
                                      s2.__super__.constructor.apply(this, arguments), this.resetInputSummary();
                                    }
                                    var d2;
                      Severity: Major
                      Found in app/assets/builds/richtext.js - About 6 hrs to fix

                        Function Block has 136 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                    t2 = e.arraysAreEqual, r = e.spliceArray, i = e.getBlockConfig, n = e.getBlockAttributeNames, o = e.getListAttributeNames, e.Block = function(n2) {
                                      function a2(t3, n3) {
                                        t3 == null && (t3 = new e.Text()), n3 == null && (n3 = []), a2.__super__.constructor.apply(this, arguments), this.text = h(t3), this.attributes = n3;
                                      }
                                      var l, h, p, d, f, g, m, v, y;
                        Severity: Major
                        Found in app/assets/builds/richtext.js - About 5 hrs to fix

                          Function md5cycle has 133 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      function md5cycle(x, k) {
                                        var a = x[0], b = x[1], c = x[2], d = x[3];
                                        a += (b & c | ~b & d) + k[0] - 680876936 | 0;
                                        a = (a << 7 | a >>> 25) + b | 0;
                                        d += (a & b | ~a & c) + k[1] - 389564586 | 0;
                          Severity: Major
                          Found in app/assets/builds/richtext.js - About 5 hrs to fix

                            File nicknames.rb has 381 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            module People
                              class Nicknames
                                def self.matches_for(name, gender = nil)
                                  match_against = if gender
                                                    gender.downcase == 'm' ? MALE_NAMES : FEMALE_NAMES
                            Severity: Minor
                            Found in app/services/people/nicknames.rb - About 5 hrs to fix

                              Function SplittableList has 124 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                          t2 = e.spliceArray, e.SplittableList = function(e2) {
                                            function i2(t3) {
                                              t3 == null && (t3 = []), i2.__super__.constructor.apply(this, arguments), this.objects = t3.slice(0), this.length = this.objects.length;
                                            }
                                            var r, s, a;
                              Severity: Major
                              Found in app/assets/builds/richtext.js - About 4 hrs to fix

                                Function App has 121 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const App = (): React.ReactNode => {
                                    const [sidebarLeft, setSidebarLeft] = useState(false)
                                    const [sidebarRight, setSidebarRight] = useState(false);
                                    const [forgePickerOpen, setForgePickerOpen] = useState(false);
                                    const hasForges = window.initialState.forges.forges.length > 1;
                                Severity: Major
                                Found in app/javascript/forge/App.tsx - About 4 hrs to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                            if (!t2.JsMutationObserver) {
                                              var g, m = /* @__PURE__ */ new WeakMap();
                                              if (/Trident|Edge/.test(navigator.userAgent))
                                                g = setTimeout;
                                              else if (window.setImmediate)
                                  Severity: Critical
                                  Found in app/assets/builds/richtext.js - About 4 hrs to fix

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

                                    const Map = (props: MapProps) => {
                                      const mapRef = useRef<HTMLDivElement>(null)
                                      const [map, setMap] = useState(null)
                                      const [markers, setMarkers] = useState(null)
                                      const [currentMarker, setCurrentMarker] = useState(null)
                                    Severity: Major
                                    Found in app/javascript/forge/Map.tsx - About 3 hrs to fix

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

                                                  e.Attachment = function(i2) {
                                                    function o(n2) {
                                                      n2 == null && (n2 = {}), this.releaseFile = t2(this.releaseFile, this), o.__super__.constructor.apply(this, arguments), this.attributes = e.Hash.box(n2), this.didChangeAttributes();
                                                    }
                                                    return n(o, i2), o.previewablePattern = /^image(\/(gif|png|jpe?g)|$)/, o.attachmentForFile = function(t3) {
                                      Severity: Major
                                      Found in app/assets/builds/richtext.js - About 3 hrs to fix

                                        Function MutationObserver has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                    t2 = e.findClosestElementFromNode, i = e.nodeIsEmptyTextNode, n = e.nodeIsBlockStartComment, o = e.normalizeSpaces, r = e.summarizeStringChange, s = e.tagName, e.MutationObserver = function(e2) {
                                                      function c2(t3) {
                                                        this.element = t3, this.didMutate = a(this.didMutate, this), this.observer = new window.MutationObserver(this.didMutate), this.start();
                                                      }
                                                      var h, p, d, f;
                                        Severity: Major
                                        Found in app/assets/builds/richtext.js - About 3 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language