angelakuo/citydogshare

View on GitHub

Showing 3,976 of 3,976 total issues

Function _determineDate has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _determineDate: function(inst, date, defaultDate) {
        var offsetNumeric = function(offset) {
                var date = new Date();
                date.setDate(date.getDate() + offset);
                return date;

    Function complete has 48 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                    complete: function( next ) {
    
                        // toggle low quality for IE
                        if ( 'image' in active ) {
                            Utils.toggleQuality( active.image, false );

      Function _mouseCapture has 48 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _mouseCapture: function( event ) {
              var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
                  that = this,
                  o = this.options;
      
      

        Function _determineDate has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _determineDate: function(inst, date, defaultDate) {
                var offsetNumeric = function(offset) {
                        var date = new Date();
                        date.setDate(date.getDate() + offset);
                        return date;

          Assignment Branch Condition size for login is too high. [17.23/15]
          Open

            def login
              # session[:expires_at] = MAX_SESSION_TIME.minutes.from_now
              # if params[:user]
              #   #re-authentication factor
              #   if self.session_expires

          This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

          Cyclomatic complexity for valid_start_end_dates? is too high. [8/6]
          Open

            def valid_start_end_dates?
              errors.add(:start_date, "Start date has passed") if start_date.present? and Date.today > start_date
              errors.add(:end_date, "End date has passed") if end_date.present? and Date.today > end_date
              if start_date.present? and end_date.present?
                errors.add(:start_end_date, "Start date must be before end date") if start_date > end_date
          Severity: Minor
          Found in app/models/event.rb by rubocop

          This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.

          An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.

          Method has too many lines. [12/10]
          Open

            def no_overlap
              names = []
              dogs.each do |dog|
                dog.events.each do |event|
                  if overlap?(event) and event.id != self.id
          Severity: Minor
          Found in app/models/event.rb by rubocop

          This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

          Method has too many lines. [12/10]
          Open

            def login
              # session[:expires_at] = MAX_SESSION_TIME.minutes.from_now
              # if params[:user]
              #   #re-authentication factor
              #   if self.session_expires

          This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

          Cyclomatic complexity for update is too high. [8/6]
          Open

            def update
              @event = Event.find(params[:id])
              if not @is_admin and @event.user != @current_user
                flash[:notice] = "You may not edit another person's event."
                redirect_to events_path

          This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.

          An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.

          Assignment Branch Condition size for dog_params is too high. [17.06/15]
          Open

            def dog_params
              params.require(:dog).keys.each do |key|
                if params[:dog][key].kind_of?(Array)
                  params[:dog][key] = purge_param(params[:dog][key])
                end
          Severity: Minor
          Found in app/controllers/dogs_controller.rb by rubocop

          This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

          Function select has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          select = Sizzle.select = function( selector, context, results, seed ) {
              var i, tokens, token, type, find,
                  compiled = typeof selector === "function" && selector,
                  match = !seed && tokenize( (selector = compiled.selector || selector) );
          
          

            Function item has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                      item: function(value, strict) {
                        var
                          $selectedItem = false
                        ;
                        value = (value !== undefined)

              Function expandEvent has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function expandEvent(abstractEvent, _rangeStart, _rangeEnd) {
                      var events = [];
                      var dowHash;
                      var dow;
                      var i;

                Function select has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                select = Sizzle.select = function( selector, context, results, seed ) {
                    var i, tokens, token, type, find,
                        compiled = typeof selector === "function" && selector,
                        match = !seed && tokenize( (selector = compiled.selector || selector) );
                
                

                  Function fetch has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                            fetch: function(tabPath, fullTabPath) {
                              var
                                $tab             = module.get.tabElement(tabPath),
                                apiSettings      = {
                                  dataType     : 'html',

                    Function unfoldSoak has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        Call.prototype.unfoldSoak = function(o) {
                          var call, ifn, j, left, len1, list, ref3, ref4, rite;
                          if (this.soak) {
                            if (this.variable) {
                              if (ifn = unfoldSoak(o, this, 'variable')) {

                      Function select has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      select = Sizzle.select = function( selector, context, results, seed ) {
                          var i, tokens, token, type, find,
                              compiled = typeof selector === "function" && selector,
                              match = !seed && tokenize( (selector = compiled.selector || selector) );
                      
                      

                        Function util has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        getJasmineRequireObj().util = function() {
                        
                          var util = {};
                        
                          util.inherit = function(childClass, parentClass) {

                          Function closeModal has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              closeModal: function(options) {
                                var defaults = {
                                  out_duration: 250,
                                  complete: undefined
                                };

                            Function scale has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            return $.effects.effect.scale = function( o, done ) {
                            
                                // Create element
                                var el = $( this ),
                                    options = $.extend( true, {}, o ),
                              Severity
                              Category
                              Status
                              Source
                              Language