ddomingues/solidus_br_common

View on GitHub

Showing 7 of 7 total issues

Function Mask has 252 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var Mask = function (el, mask, options) {
        var jMask = this, old_value, regexMask;
        el = $(el);

        mask = typeof mask === "function" ? mask(el.val(), undefined, el,  options) : mask;
Severity: Major
Found in app/assets/javascripts/spree/frontend/plugins/jquery.mask.js - About 1 day to fix

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

    /**
     * jquery.mask.js
     * @version: v1.6.5
     * @author: Igor Escobar
     *
    Severity: Minor
    Found in app/assets/javascripts/spree/frontend/plugins/jquery.mask.js - About 3 hrs to fix

      Function getMasked has 61 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  getMasked: function (skipMaskChars) {
                      var buf = [],
                          value = p.val(),
                          m = 0, maskLen = mask.length,
                          v = 0, valLen = value.length,
      Severity: Major
      Found in app/assets/javascripts/spree/frontend/plugins/jquery.mask.js - About 2 hrs to fix

        Function events has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    events: function() {
                        el.on('keydown.mask', function() {
                            old_value = p.val();
                        });
                        el.on('keyup.mask', p.behaviour);
        Severity: Minor
        Found in app/assets/javascripts/spree/frontend/plugins/jquery.mask.js - About 1 hr to fix

          Function init has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  jMask.init = function() {
                      options = options || {};
          
                      jMask.byPassKeys = [9, 16, 17, 18, 36, 37, 38, 39, 40, 91];
                      jMask.translation = {
          Severity: Minor
          Found in app/assets/javascripts/spree/frontend/plugins/jquery.mask.js - About 1 hr to fix

            Avoid deeply nested control flow statements.
            Open

                                            if (resetPos === -1) {
                                                resetPos = m;
                                            } else if (m === lastMaskChar) {
                                                m = resetPos - offset;
                                            }
            Severity: Major
            Found in app/assets/javascripts/spree/frontend/plugins/jquery.mask.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                              if (lastMaskChar === resetPos) {
                                                  m -= offset;
                                              }
              Severity: Major
              Found in app/assets/javascripts/spree/frontend/plugins/jquery.mask.js - About 45 mins to fix
                Severity
                Category
                Status
                Source
                Language