ophrescue/RescueRails

View on GitHub

Showing 159 of 254 total issues

File jquery.inputmask.js has 2758 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * dist/jquery.inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2021 Robin Herbots
 * Licensed under the MIT license
Severity: Major
Found in app/assets/javascripts/jquery.inputmask.js - About 1 wk to fix

    Function 207 has 370 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                207: function(e, t, a) {
                    var i = s(a(2394)), n = s(a(4528)), r = s(a(7184)), o = a(8711);
                    function s(e) {
                        return e && e.__esModule ? e : {
                            default: e
    Severity: Major
    Found in app/assets/javascripts/jquery.inputmask.js - About 1 day to fix

      Function 219 has 323 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  219: function(e, t, a) {
                      var i = l(a(2394)), n = l(a(4528)), r = l(a(7184)), o = a(8711);
                      function s(e) {
                          return (s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
                              return typeof e;
      Severity: Major
      Found in app/assets/javascripts/jquery.inputmask.js - About 1 day to fix

        Function 7215 has 286 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    7215: function(e, t, a) {
                        Object.defineProperty(t, "__esModule", {
                            value: !0
                        }), t.alternate = l, t.checkAlternationMatch = function(e, t, a) {
                            for (var i, n = this.opts.greedy ? t : t.slice(0, 1), r = !1, o = void 0 !== a ? a.split(",") : [], s = 0; s < o.length; s++) -1 !== (i = e.indexOf(o[s])) && e.splice(i, 1);
        Severity: Major
        Found in app/assets/javascripts/jquery.inputmask.js - About 1 day to fix

          Function 4713 has 234 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      4713: function(e, t) {
                          function a(e, t) {
                              var a = (null != e.alternation ? e.mloc[i(e)] : e.locator).join("");
                              if ("" !== a) for (;a.length < t; ) a += "0";
                              return a;
          Severity: Major
          Found in app/assets/javascripts/jquery.inputmask.js - About 1 day to fix

            Function 2391 has 221 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                        2391: function(e, t, a) {
                            Object.defineProperty(t, "__esModule", {
                                value: !0
                            }), t.generateMaskSet = function(e, t) {
                                var a;
            Severity: Major
            Found in app/assets/javascripts/jquery.inputmask.js - About 1 day to fix

              Function 6030 has 210 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          6030: function(e, t, a) {
                              Object.defineProperty(t, "__esModule", {
                                  value: !0
                              }), t.EventHandlers = void 0;
                              var i, n = a(8711), r = (i = a(4528)) && i.__esModule ? i : {
              Severity: Major
              Found in app/assets/javascripts/jquery.inputmask.js - About 1 day to fix

                Function 2394 has 176 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                            2394: function(e, t, a) {
                                Object.defineProperty(t, "__esModule", {
                                    value: !0
                                }), t.default = void 0, a(7149), a(3194);
                                var i = a(157), n = v(a(3287)), r = v(a(9380)), o = a(2391), s = a(4713), l = a(8711), u = a(7215), c = a(7760), f = a(9716), d = v(a(7392)), p = v(a(3976)), h = v(a(8741));
                Severity: Major
                Found in app/assets/javascripts/jquery.inputmask.js - About 7 hrs to fix

                  Function analyseMask has 171 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                  }, t.analyseMask = function(e, t, a) {
                                      var i, r, o, s, l, u, c = /(?:[?*+]|\{[0-9+*]+(?:,[0-9+*]*)?(?:\|[0-9+*]*)?\})|[^.?*+^${[]()|\\]+|./g, f = /\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g, d = !1, p = new n.default, h = [], m = [], v = !1;
                                      function g(e, i, n) {
                                          n = void 0 !== n ? n : e.matches.length;
                                          var r = e.matches[n - 1];
                  Severity: Major
                  Found in app/assets/javascripts/jquery.inputmask.js - About 6 hrs to fix

                    Function u has 163 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                    function u(e, t, a) {
                                        var i, n = this, r = this.dependencyLib, s = this.maskset, u = this.opts, c = this.el, f = s.maskToken, d = t ? a : 0, p = t ? t.slice() : [ 0 ], h = [], m = !1, v = t ? t.join("") : "";
                                        function g(t, a, n, r) {
                                            function o(n, r, f) {
                                                function p(e, t) {
                    Severity: Major
                    Found in app/assets/javascripts/jquery.inputmask.js - About 6 hrs to fix

                      Consider simplifying this complex logical expression.
                      Open

                                              if (!0 === e && f.validPositions[k]) m = s && !0 === f.validPositions[k].match.optionality && void 0 === f.validPositions[k + 1] && (!0 === f.validPositions[k].generatedInput || f.validPositions[k].input == c.skipOptionalPartCharacter && k > 0) ? o.call(l, k, u.call(l, k, p, k - 1)) : f.validPositions[k],
                                              h = m.match, p = m.locator.slice(), g.push(!0 === a ? m.input : !1 === a ? h.nativeDef : n.call(l, k, h)); else {
                                                  m = r.call(l, k, p, k - 1), h = m.match, p = m.locator.slice();
                                                  var y = !0 !== i && (!1 !== c.jitMasking ? c.jitMasking : h.jit);
                                                  (v = (v && h.static && h.def !== c.groupSeparator && null === h.fn || f.validPositions[k - 1] && h.static && h.def !== c.groupSeparator && null === h.fn) && f.tests[k] && 1 === f.tests[k].length) || !1 === y || void 0 === y || "number" == typeof y && isFinite(y) && y > k ? g.push(!1 === a ? h.nativeDef : n.call(l, k, h)) : v = !1;
                      Severity: Critical
                      Found in app/assets/javascripts/jquery.inputmask.js - About 6 hrs to fix

                        Function 8711 has 143 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                    8711: function(e, t, a) {
                                        Object.defineProperty(t, "__esModule", {
                                            value: !0
                                        }), t.caret = function(e, t, a, i, n) {
                                            var r, o = this, s = this.opts;
                        Severity: Major
                        Found in app/assets/javascripts/jquery.inputmask.js - About 5 hrs to fix

                          Method user_params has 141 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            def user_params
                              if current_user && current_user.admin?
                                params.require(:user)
                                  .permit(:name,
                                          :avatar,
                          Severity: Major
                          Found in app/controllers/users_controller.rb - About 5 hrs to fix

                            Consider simplifying this complex logical expression.
                            Open

                                                    if (t) 0 === i.indexOf("[") || d && /\\d|\\s|\\w]/i.test(i) || "." === i ? e.matches.splice(n++, 0, {
                                                        fn: new RegExp(i, a.casing ? "i" : ""),
                                                        static: !1,
                                                        optionality: !1,
                                                        newBlockMarker: void 0 === r ? "master" : r.def !== i,
                            Severity: Critical
                            Found in app/assets/javascripts/jquery.inputmask.js - About 5 hrs to fix

                              Function g has 131 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                                  function g(t, a, n, r) {
                                                      function o(n, r, f) {
                                                          function p(e, t) {
                                                              var a = 0 === t.matches.indexOf(e);
                                                              return a || t.matches.every((function(i, n) {
                              Severity: Major
                              Found in app/assets/javascripts/jquery.inputmask.js - About 5 hrs to fix

                                Consider simplifying this complex logical expression.
                                Open

                                                    if (void 0 !== c) {
                                                        v = parseInt(u), S.excludes[v] = S.excludes[v] || [], !0 !== e && S.excludes[v].push((0,
                                                        n.getDecisionTaker)(p) + ":" + p.alternation);
                                                        var A = [], C = -1;
                                                        for (h = v; h < o.getLastValidPosition.call(x, void 0, !0) + 1; h++) -1 === C && e <= h && void 0 !== t && (A.push(t),
                                Severity: Critical
                                Found in app/assets/javascripts/jquery.inputmask.js - About 5 hrs to fix

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

                                                          function o(n, r, f) {
                                                              function p(e, t) {
                                                                  var a = 0 === t.matches.indexOf(e);
                                                                  return a || t.matches.every((function(i, n) {
                                                                      return !0 === i.isQuantifier ? a = p(e, t.matches[n - 1]) : Object.prototype.hasOwnProperty.call(i, "matches") && (a = p(e, i)),
                                  Severity: Major
                                  Found in app/assets/javascripts/jquery.inputmask.js - About 4 hrs to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                                            if (d !== f) {
                                                                var h = function(e, i, r) {
                                                                    for (var o, s, l, c = e.substr(0, r.begin).split(""), f = e.substr(r.begin).split(""), d = i.substr(0, r.begin).split(""), p = i.substr(r.begin).split(""), h = c.length >= d.length ? c.length : d.length, m = f.length >= p.length ? f.length : p.length, v = "", g = [], k = "~"; c.length < h; ) c.push(k);
                                                                    for (;d.length < h; ) d.push(k);
                                                                    for (;f.length < m; ) f.unshift(k);
                                    Severity: Critical
                                    Found in app/assets/javascripts/jquery.inputmask.js - About 4 hrs to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                                              if (e[i] = "ampm" === i ? t : t.replace(/[^0-9]/g, "0"), e["raw" + i] = t, void 0 !== r) {
                                                                  var n = e[i];
                                                                  ("day" === i && 29 === parseInt(n) || "month" === i && 2 === parseInt(n)) && (29 !== parseInt(e.day) || 2 !== parseInt(e.month) || "" !== e.year && void 0 !== e.year || e.date.setFullYear(2012, 1, 29)),
                                                                  "day" === i && 0 === parseInt(n) && (n = 1), "month" === i && (n = parseInt(n)) > 0 && (n -= 1),
                                                                  "year" === i && n.length < 4 && (n = y(n, 4, !0)), "" === n || isNaN(n) || r.call(e.date, n),
                                      Severity: Critical
                                      Found in app/assets/javascripts/jquery.inputmask.js - About 4 hrs to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                                                if (void 0 !== e) {
                                                                    var i = new d.Event("_checkval");
                                                                    i.which = e.toString().charCodeAt(0), m += e;
                                                                    var n = o.getLastValidPosition.call(l, void 0, !0);
                                                                    !function(e, t) {
                                        Severity: Critical
                                        Found in app/assets/javascripts/jquery.inputmask.js - About 4 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language