mysociety/alaveteli

View on GitHub

Showing 3 of 1,294 total issues

Consider simplifying this complex logical expression.
Open

            if (e.type && e.type.toLowerCase() === 'keydown') {
                keyCode = e.keyCode;
                printable = (
                    (keyCode >= 48 && keyCode <= 57)  || // 0-9
                    (keyCode >= 65 && keyCode <= 90)   || // a-z
Severity: Critical
Found in app/assets/javascripts/alaveteli_pro/selectize.js - About 2 hrs to fix

    Consider simplifying this complex logical expression.
    Open

                        if (isNaN(v) || v < axis.min || v > axis.max
                            // skip those lying on the axes if we got a border
                            || (t == "full"
                                && ((typeof bw == "object" && bw[axis.position] > 0) || bw > 0)
                                && (v == axis.min || v == axis.max)))
    Severity: Critical
    Found in app/assets/javascripts/jquery.flot.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

          if feature_enabled? :alaveteli_pro
            # Accessing alaveteli professional
            if user && (user.is_pro_admin? || user.is_pro?)
              can :access, :alaveteli_pro
            end
      Severity: Critical
      Found in app/models/ability.rb - About 1 hr to fix
        Severity
        Category
        Status
        Source