ourcities/panela-de-pressao

View on GitHub

Showing 108 of 136 total issues

Function domReady has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var domReady=function(){
var _1=[];
var _2=function(){
if(!arguments.callee.done){
arguments.callee.done=true;
Severity: Minor
Found in app/assets/javascripts/css3-mediaqueries.js - About 1 hr to fix

    Function _1e has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var _1e=function(){
    _5=true;
    _4=[];
    var _1f=[];
    var _20=function(){
    Severity: Minor
    Found in app/assets/javascripts/css3-mediaqueries.js - About 1 hr to fix

      Function save has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          save: function(key, value, options) {
            var attrs, current;
      
            // Handle both `("key", value)` and `({key: value})` -style calls.
            if (_.isObject(key) || key == null) {
      Severity: Minor
      Found in app/assets/javascripts/lib/backbone.js - About 1 hr to fix

        Method create has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def create
            begin
              params[:ip] = request.remote_ip
              params[:organization_id] = @campaign.organization_id
              params[:password] = SecureRandom.hex
        Severity: Minor
        Found in app/controllers/pokes_controller.rb - About 1 hr to fix

          Function _52 has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var _52=function(){
          var _53=cssHelper.getViewportWidth();
          var _54=cssHelper.getViewportHeight();
          if(ua.ie){
          var el=document.createElement("div");
          Severity: Minor
          Found in app/assets/javascripts/css3-mediaqueries.js - About 1 hr to fix

            Function add has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                add: function(models, options) {
                  var i, index, length, model, cid, id, cids = {}, ids = {}, dups = [];
                  options || (options = {});
                  models = _.isArray(models) ? models.slice() : [models];
            
            
            Severity: Minor
            Found in app/assets/javascripts/lib/backbone.js - About 1 hr to fix

              Function set has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  set: function(key, value, options) {
                    var attrs, attr, val;
              
                    // Handle both `"key", value` and `{key: value}` -style arguments.
                    if (_.isObject(key) || key == null) {
              Severity: Minor
              Found in app/assets/javascripts/lib/backbone.js - About 1 hr to fix

                Function _c has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var _c=function(_d,_e,_f){
                if(ua.ie&&!window.XMLHttpRequest){
                window.XMLHttpRequest=function(){
                return new ActiveXObject("Microsoft.XMLHTTP");
                };
                Severity: Minor
                Found in app/assets/javascripts/css3-mediaqueries.js - About 1 hr to fix

                  Function start has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      start: function(options) {
                        if (History.started) throw new Error("Backbone.history has already been started");
                        History.started = true;
                  
                        // Figure out the initial configuration. Do we need an iframe?
                  Severity: Minor
                  Found in app/assets/javascripts/lib/backbone.js - About 1 hr to fix

                    Function mediaQuery has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    },mediaQuery:function(s,mql){
                    s=s||"";
                    var not=false,_14;
                    var exp=[];
                    var _15=true;
                    Severity: Minor
                    Found in app/assets/javascripts/css3-mediaqueries.js - About 1 hr to fix

                      Function getTestingChain has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  function getTestingChain() {
                                      var isOptional = false, escaped = false;
                                      var newBlockMarker = false; //indicates wheter the begin/ending of a block should be indicated
                      
                                      return $.map(opts.mask.split(""), function (element, index) {
                      Severity: Minor
                      Found in app/assets/javascripts/lib/jquery.inputmask.js - About 1 hr to fix

                        Function domReady has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                        var domReady=function(){
                        var _1=[];
                        var _2=function(){
                        if(!arguments.callee.done){
                        arguments.callee.done=true;
                        Severity: Minor
                        Found in app/assets/javascripts/css3-mediaqueries.js - About 1 hr 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

                        Function caret has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                    function caret(input, begin, end) {
                                        var npt = input.jquery && input.length > 0 ? input[0] : input;
                                        if (typeof begin == 'number') {
                                            end = (typeof end == 'number') ? end : begin;
                                            if (opts.insertMode == false && begin == end) end++; //set visualization for insert/overwrite mode
                        Severity: Minor
                        Found in app/assets/javascripts/lib/jquery.inputmask.js - About 1 hr to fix

                          Function rule has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          },rule:function(s,mql){
                          var o={};
                          var idx=s.indexOf("{");
                          var st=s.substring(0,idx);
                          var ss=st.split(",");
                          Severity: Minor
                          Found in app/assets/javascripts/css3-mediaqueries.js - About 1 hr to fix

                            Function mediaQueryList has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            var _13={mediaQueryList:function(s){
                            var o={};
                            var idx=s.indexOf("{");
                            var lt=s.substring(0,idx);
                            s=s.substring(idx+1,s.length-1);
                            Severity: Minor
                            Found in app/assets/javascripts/css3-mediaqueries.js - About 1 hr to fix

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

                                Backbone.sync = function(method, model, options) {
                                  var type = methodMap[method];
                              
                                  // Default options, unless specified.
                                  options || (options = {});
                              Severity: Minor
                              Found in app/assets/javascripts/lib/backbone.js - About 1 hr to fix

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

                                            function getMaskTemplate() {
                                                var escaped = false, outCount = 0;
                                                if (opts.mask.length == 1 && opts.greedy == false) { opts.placeholder = ""; } //hide placeholder with single non-greedy mask
                                                var singleMask = $.map(opts.mask.split(""), function (element, index) {
                                                    var outElem = [];
                                Severity: Minor
                                Found in app/assets/javascripts/lib/jquery.inputmask.js - About 1 hr to fix

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

                                    _.template = function(text, data, settings) {
                                      settings = _.defaults(settings || {}, _.templateSettings);
                                  
                                      // Compile the template source, taking care to escape characters that
                                      // cannot be included in a string literal and then unescape them in code
                                  Severity: Minor
                                  Found in app/assets/javascripts/lib/underscore.js - About 1 hr to fix

                                    Method initialize has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      def initialize(user, request = nil)
                                        can :read, User
                                        can :read, Answer
                                        can :manage, Poke
                                        can :read, Campaign
                                    Severity: Minor
                                    Found in app/models/ability.rb - About 1 hr to fix

                                      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
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language