ophrescue/RescueRails

View on GitHub

Showing 254 of 254 total issues

Consider simplifying this complex logical expression.
Open

                    if (h.default) {
                        if (!(this instanceof y)) return new y(e, t, a);
                        this.dependencyLib = n.default, this.el = void 0, this.events = {}, this.maskset = void 0,
                        !0 !== a && ("[object Object]" === Object.prototype.toString.call(e) ? t = e : (t = t || {},
                        e && (t.alias = e)), this.opts = n.default.extend(!0, {}, this.defaults, t), this.noMasksCache = t && void 0 !== t.definitions,
Severity: Major
Found in app/assets/javascripts/jquery.inputmask.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

                            if (!s.isComplete.call(l, o.getBuffer.call(l)) && y.length <= E || s.isComplete.call(l, o.getBuffer.call(l)) && y.length > 0 && y.length !== E && 0 === y[0]) for (var S = E; void 0 !== (x = y.shift()); ) {
                                var w = new d.Event("_checkval");
                                if ((P = c.validPositions[x]).generatedInput = !0, w.which = P.input.charCodeAt(0),
                                (g = u.EventHandlers.keypressEvent.call(l, w, !0, !1, a, S)) && void 0 !== g.pos && g.pos !== x && c.validPositions[g.pos] && !0 === c.validPositions[g.pos].match.static) y.push(g.pos); else if (!g) break;
                                S++;
    Severity: Major
    Found in app/assets/javascripts/jquery.inputmask.js - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

                                          if (Object.getOwnPropertyDescriptor) {
                                              var f = Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t), "value") : void 0;
                                              f && f.get && f.set ? (n = f.get, l = f.set, Object.defineProperty(t, "value", {
                                                  get: u,
                                                  set: c,
      Severity: Major
      Found in app/assets/javascripts/jquery.inputmask.js - About 40 mins to fix

        Function getMaskTemplate has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                        }), t.determineTestTemplate = o, t.getDecisionTaker = i, t.getMaskTemplate = function(e, t, a, i, s) {
        Severity: Minor
        Found in app/assets/javascripts/jquery.inputmask.js - About 35 mins to fix

          Function d has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                          function d(e, t, a, i, n) {
          Severity: Minor
          Found in app/assets/javascripts/jquery.inputmask.js - About 35 mins to fix

            Function validator has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                                            validator: function(e, t, a, i, n) {
            Severity: Minor
            Found in app/assets/javascripts/jquery.inputmask.js - About 35 mins to fix

              Function caret has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                              }), t.caret = function(e, t, a, i, n) {
              Severity: Minor
              Found in app/assets/javascripts/jquery.inputmask.js - About 35 mins to fix

                Function keypressEvent has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                                    keypressEvent: function(e, t, a, i, o) {
                Severity: Minor
                Found in app/assets/javascripts/jquery.inputmask.js - About 35 mins to fix

                  Function handleRemove has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                                  t.handleRemove = function(e, t, a, i, s) {
                  Severity: Minor
                  Found in app/assets/javascripts/jquery.inputmask.js - About 35 mins to fix

                    Function validator has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                                                    validator: function(e, t, a, i, n) {
                    Severity: Minor
                    Found in app/assets/javascripts/jquery.inputmask.js - About 35 mins to fix

                      Function p has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                                      function p(e, t, a, i, n) {
                      Severity: Minor
                      Found in app/assets/javascripts/jquery.inputmask.js - About 35 mins to fix

                        Function p has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                        function p(e, t, a, i, r) {
                        Severity: Minor
                        Found in app/assets/javascripts/jquery.inputmask.js - About 35 mins to fix

                          Function l has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                          function l(e, t, a, i, n) {
                          Severity: Minor
                          Found in app/assets/javascripts/jquery.inputmask.js - About 35 mins to fix

                            Similar blocks of code found in 2 locations. Consider refactoring.
                            Open

                              def index
                                @cats = case
                                        when params[:autocomplete] # it's autocomplete of dog names on the adopters/:id page
                                          Cat.autocomplete_name(params[:search])
                                        else # gallery view
                            Severity: Minor
                            Found in app/controllers/cats/gallery_controller.rb and 1 other location - About 35 mins to fix
                            app/controllers/dogs/gallery_controller.rb on lines 71..83

                            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 36.

                            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

                              def index
                                @dogs = case
                                        when params[:autocomplete] # it's autocomplete of dog names on the adopters/:id page
                                          Dog.autocomplete_name(params[:search])
                                        else # gallery view
                            Severity: Minor
                            Found in app/controllers/dogs/gallery_controller.rb and 1 other location - About 35 mins to fix
                            app/controllers/cats/gallery_controller.rb on lines 21..33

                            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 36.

                            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 9 locations. Consider refactoring.
                            Open

                                                yyyy: [ "[0-9]{4}", Date.prototype.setFullYear, "year", function() {
                                                    return y(Date.prototype.getFullYear.call(this), 4);
                                                } ],
                            Severity: Major
                            Found in app/assets/javascripts/jquery.inputmask.js and 8 other locations - About 35 mins to fix
                            app/assets/javascripts/jquery.inputmask.js on lines 458..460
                            app/assets/javascripts/jquery.inputmask.js on lines 471..473
                            app/assets/javascripts/jquery.inputmask.js on lines 478..480
                            app/assets/javascripts/jquery.inputmask.js on lines 487..489
                            app/assets/javascripts/jquery.inputmask.js on lines 498..500
                            app/assets/javascripts/jquery.inputmask.js on lines 502..504
                            app/assets/javascripts/jquery.inputmask.js on lines 505..507
                            app/assets/javascripts/jquery.inputmask.js on lines 508..510

                            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 47.

                            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 9 locations. Consider refactoring.
                            Open

                                                MM: [ "0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]", Date.prototype.setMinutes, "minutes", function() {
                                                    return y(Date.prototype.getMinutes.call(this), 2);
                                                } ],
                            Severity: Major
                            Found in app/assets/javascripts/jquery.inputmask.js and 8 other locations - About 35 mins to fix
                            app/assets/javascripts/jquery.inputmask.js on lines 458..460
                            app/assets/javascripts/jquery.inputmask.js on lines 471..473
                            app/assets/javascripts/jquery.inputmask.js on lines 474..476
                            app/assets/javascripts/jquery.inputmask.js on lines 478..480
                            app/assets/javascripts/jquery.inputmask.js on lines 487..489
                            app/assets/javascripts/jquery.inputmask.js on lines 502..504
                            app/assets/javascripts/jquery.inputmask.js on lines 505..507
                            app/assets/javascripts/jquery.inputmask.js on lines 508..510

                            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 47.

                            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 9 locations. Consider refactoring.
                            Open

                                                dd: [ "0[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", function() {
                                                    return y(Date.prototype.getDate.call(this), 2);
                                                } ],
                            Severity: Major
                            Found in app/assets/javascripts/jquery.inputmask.js and 8 other locations - About 35 mins to fix
                            app/assets/javascripts/jquery.inputmask.js on lines 471..473
                            app/assets/javascripts/jquery.inputmask.js on lines 474..476
                            app/assets/javascripts/jquery.inputmask.js on lines 478..480
                            app/assets/javascripts/jquery.inputmask.js on lines 487..489
                            app/assets/javascripts/jquery.inputmask.js on lines 498..500
                            app/assets/javascripts/jquery.inputmask.js on lines 502..504
                            app/assets/javascripts/jquery.inputmask.js on lines 505..507
                            app/assets/javascripts/jquery.inputmask.js on lines 508..510

                            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 47.

                            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 9 locations. Consider refactoring.
                            Open

                                                l: [ "[0-9]{3}", Date.prototype.setMilliseconds, "milliseconds", function() {
                                                    return y(Date.prototype.getMilliseconds.call(this), 3);
                                                } ],
                            Severity: Major
                            Found in app/assets/javascripts/jquery.inputmask.js and 8 other locations - About 35 mins to fix
                            app/assets/javascripts/jquery.inputmask.js on lines 458..460
                            app/assets/javascripts/jquery.inputmask.js on lines 471..473
                            app/assets/javascripts/jquery.inputmask.js on lines 474..476
                            app/assets/javascripts/jquery.inputmask.js on lines 478..480
                            app/assets/javascripts/jquery.inputmask.js on lines 487..489
                            app/assets/javascripts/jquery.inputmask.js on lines 498..500
                            app/assets/javascripts/jquery.inputmask.js on lines 502..504
                            app/assets/javascripts/jquery.inputmask.js on lines 508..510

                            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 47.

                            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 9 locations. Consider refactoring.
                            Open

                                                hh: [ "0[1-9]|1[0-2]", Date.prototype.setHours, "hours", function() {
                                                    return y(Date.prototype.getHours.call(this), 2);
                                                } ],
                            Severity: Major
                            Found in app/assets/javascripts/jquery.inputmask.js and 8 other locations - About 35 mins to fix
                            app/assets/javascripts/jquery.inputmask.js on lines 458..460
                            app/assets/javascripts/jquery.inputmask.js on lines 471..473
                            app/assets/javascripts/jquery.inputmask.js on lines 474..476
                            app/assets/javascripts/jquery.inputmask.js on lines 487..489
                            app/assets/javascripts/jquery.inputmask.js on lines 498..500
                            app/assets/javascripts/jquery.inputmask.js on lines 502..504
                            app/assets/javascripts/jquery.inputmask.js on lines 505..507
                            app/assets/javascripts/jquery.inputmask.js on lines 508..510

                            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 47.

                            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