ourcities/panela-de-pressao

View on GitHub

Showing 108 of 136 total issues

Consider simplifying this complex logical expression.
Open

if(!r.status&&location.protocol==="file:"||(r.status>=200&&r.status<300)||r.status===304||navigator.userAgent.indexOf("Safari")>-1&&typeof r.status==="undefined"){
_e(r.responseText);
}else{
_f();
}
Severity: Major
Found in app/assets/javascripts/css3-mediaqueries.js - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

    if(_43==="absolute"){
    return ((min&&_49>=_44)||(max&&_49<_44)||(!min&&!max&&_49===_44));
    }else{
    return false;
    }
    Severity: Major
    Found in app/assets/javascripts/css3-mediaqueries.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

      if(_43==="length"){
      return ((min&&_46>=_44)||(max&&_46<_44)||(!min&&!max&&_46===_44));
      }else{
      return false;
      }
      Severity: Major
      Found in app/assets/javascripts/css3-mediaqueries.js - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

        if(_43==="length"){
        return ((min&&_46>=_44)||(max&&_46<_44)||(!min&&!max&&_46===_44));
        }else{
        return false;
        }
        Severity: Major
        Found in app/assets/javascripts/css3-mediaqueries.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

          if(_43==="length"){
          return ((min&&_47>=_44)||(max&&_47<_44)||(!min&&!max&&_47===_44));
          }else{
          return false;
          }
          Severity: Major
          Found in app/assets/javascripts/css3-mediaqueries.js - About 1 hr to fix

            Consider simplifying this complex logical expression.
            Open

            if(_43==="resolution"){
            return ((min&&res>=_44)||(max&&res<_44)||(!min&&!max&&res===_44));
            }else{
            return false;
            }
            Severity: Major
            Found in app/assets/javascripts/css3-mediaqueries.js - About 1 hr to fix

              Consider simplifying this complex logical expression.
              Open

              if(_43==="length"){
              return ((min&&_47>=_44)||(max&&_47<_44)||(!min&&!max&&_47===_44));
              }else{
              return false;
              }
              Severity: Major
              Found in app/assets/javascripts/css3-mediaqueries.js - About 1 hr to fix

                Method index has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                  def index
                    respond_to do |format|
                      format.html do
                        @popular = Campaign.popular.unarchived.includes(:user).limit(4).shuffle
                        @featured = Campaign.featured.first
                Severity: Minor
                Found in app/controllers/campaigns_controller.rb - About 45 mins to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Avoid deeply nested control flow statements.
                Open

                                                    if (Object.getOwnPropertyDescriptor)
                                                        valueProperty = Object.getOwnPropertyDescriptor(input, "value");
                Severity: Major
                Found in app/assets/javascripts/lib/jquery.inputmask.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                                  if (isOptional == true) //reset newBlockMarker
                                                      newBlockMarker = false;
                  Severity: Major
                  Found in app/assets/javascripts/lib/jquery.inputmask.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                if (inputValue[i] == getBufferElement(buffer, pos))
                                                    break;
                    Severity: Major
                    Found in app/assets/javascripts/lib/jquery.inputmask.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                  if (getPlaceHolder(pos) == buffer[pos] || !isMask(pos))
                                                      tmpBuffer.splice(0, 1);
                                                  else break;
                      Severity: Major
                      Found in app/assets/javascripts/lib/jquery.inputmask.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                        if (j < getMaskLength()) {
                                                            if (isValid(j, t, buffer, true) !== false && tests[determineTestPosition(i)].def == tests[determineTestPosition(j)].def)
                                                                c = t;
                                                            else {
                                                                if (isMask(j))
                        Severity: Major
                        Found in app/assets/javascripts/lib/jquery.inputmask.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                          if (opts.numericInput && opts.greedy && k == opts.keyCode.DELETE && buffer[beginPos] == opts.radixPoint) {
                                                              beginPos = seekNext(buffer, beginPos);
                                                              isRTL = false;
                                                          }
                          Severity: Major
                          Found in app/assets/javascripts/lib/jquery.inputmask.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                                if (valueProperty && valueProperty.get) {
                                                                    if (input._valueGet) {
                                                                        Object.defineProperty(input, "value", {
                                                                            get: input._valueGet,
                                                                            set: input._valueSet
                            Severity: Major
                            Found in app/assets/javascripts/lib/jquery.inputmask.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                              if(!c[n]){
                              c[n]=v[n];
                              }else{
                              c[n]=c[n].concat(v[n]);
                              }
                              Severity: Major
                              Found in app/assets/javascripts/css3-mediaqueries.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                if("device-aspect-ratio"===_41.substring(l-19,l)){
                                return _43==="aspect-ratio"&&screen.width*_44[1]===screen.height*_44[0];
                                }else{
                                if("color-index"===_41.substring(l-11,l)){
                                var _48=Math.pow(2,screen.colorDepth);
                                Severity: Major
                                Found in app/assets/javascripts/css3-mediaqueries.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                                  if ((np = isValid(p, c, buffer, false)) !== false) {
                                                                      if (np !== true) {
                                                                          p = np.pos || p; //set new position from isValid
                                                                          c = np.c || c; //set new char from isValid
                                                                      }
                                  Severity: Major
                                  Found in app/assets/javascripts/lib/jquery.inputmask.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                    if (j < getMaskLength() && isValid(i, p, buffer, true) !== false && tests[determineTestPosition(i)].def == tests[determineTestPosition(j)].def) {
                                                                        setBufferElement(buffer, i, getBufferElement(buffer, j));
                                                                        setReTargetPlaceHolder(buffer, j); //cleanup next position
                                                                    } else {
                                                                        if (isMask(i))
                                    Severity: Major
                                    Found in app/assets/javascripts/lib/jquery.inputmask.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                      if (isRTL) {
                                                                          beginPos = shiftR(firstMaskPos, beginPos, getPlaceHolder(beginPos), true);
                                                                          beginPos = (opts.numericInput && opts.greedy && k == opts.keyCode.BACKSPACE && buffer[beginPos + 1] == opts.radixPoint) ? beginPos + 1 : seekNext(buffer, beginPos);
                                                                      } else beginPos = shiftL(beginPos, maskL);
                                      Severity: Major
                                      Found in app/assets/javascripts/lib/jquery.inputmask.js - About 45 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language