angelakuo/citydogshare

View on GitHub

Showing 3,976 of 3,976 total issues

Function stick has 69 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        stick: function() {
          var
            cache          = module.cache,
            fits           = cache.fits,
            element        = cache.element,

    Function limitRow has 69 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        limitRow: function(row, levelLimit) {
            var _this = this;
            var rowStruct = this.rowStructs[row];
            var moreNodes = []; // array of "more" <a> links and <td> DOM nodes
            var col = 0; // col #, left-to-right (not chronologically)

      Function resolve has 69 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                          function resolve( depth, deferred, handler, special ) {
                              return function() {
                                  var that = this,
                                      args = arguments,
                                      mightThrow = function() {

        Function base has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
        Open

        getJasmineRequireObj().base = function(j$, jasmineGlobal) {
          j$.unimplementedMethod_ = function() {
            throw new Error('unimplemented method');
          };
        
        

        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 renderSegRow has 68 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            renderSegRow: function(row, rowSegs) {
                var colCnt = this.colCnt;
                var segLevels = this.buildSegLevels(rowSegs); // group into sub-arrays of levels
                var levelCnt = Math.max(1, segLevels.length); // ensure at least one level
                var tbody = $('<tbody/>');

          Function processRelativeTime has 68 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function processRelativeTime(number, withoutSuffix, key, isFuture) {
                  var result = number + ' ';
                  switch (key) {
                      case 's':
                          return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';

            Function regexToken has 68 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                Lexer.prototype.regexToken = function() {
                  var body, closed, end, flags, index, match, origin, prev, ref2, ref3, ref4, regex, tokens;
                  switch (false) {
                    case !(match = REGEX_ILLEGAL.exec(this.chunk)):
                      this.error("regular expressions cannot begin with " + match[2], {

              Function _keydown has 68 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _keydown: function( event ) {
                      var match, prev, character, skip,
                          preventDefault = true;
              
                      switch ( event.keyCode ) {

                Function _keydown has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _keydown: function( event ) {
                        var match, prev, character, skip,
                            preventDefault = true;
                
                        switch ( event.keyCode ) {

                  Function _keydown has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _keydown: function( event ) {
                          var match, prev, character, skip,
                              preventDefault = true;
                  
                          switch ( event.keyCode ) {

                    Function _keydown has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _keydown: function( event ) {
                            var match, prev, character, skip,
                                preventDefault = true;
                    
                            switch ( event.keyCode ) {

                      Assignment Branch Condition size for to_form_hash is too high. [24.02/15]
                      Open

                        def to_form_hash
                          return {
                            :name => self.name,
                            :dob => self.dob.year,
                            :size => self.size.id,
                      Severity: Minor
                      Found in app/models/dog.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

                      Assignment Branch Condition size for valid_start_end_dates? is too high. [24.04/15]
                      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 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

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

                        def edit
                          flash[:notice] = "All information added here will be visible to other members."
                          if @current_user.dogs.empty?
                            flash[:notice] = "Please update your zipcode to add a dog. All information added here will be visible to other members."
                          end
                      Severity: Minor
                      Found in app/controllers/users_controller.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.

                      Function done has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              function done( status, nativeStatusText, responses, headers ) {
                                  var isSuccess, success, error, response, modified,
                                      statusText = nativeStatusText;
                      
                                  // Called once

                        Function bodyCSS has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                  bodyCSS: function() {
                                    var
                                      width     = $module.outerWidth(),
                                      height    = $module.outerHeight(),
                                      direction = module.get.direction(),

                          Function done has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  function done( status, nativeStatusText, responses, headers ) {
                                      var isSuccess, success, error, response, modified,
                                          statusText = nativeStatusText;
                          
                                      // Ignore repeat invocations

                            Function done has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    function done( status, nativeStatusText, responses, headers ) {
                                        var isSuccess, success, error, response, modified,
                                            statusText = nativeStatusText;
                            
                                        // Called once

                              Function MockDate has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              getJasmineRequireObj().MockDate = function() {
                                function MockDate(global) {
                                  var self = this;
                                  var currentTime = 0;
                              
                              

                                Function _parseData has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    _parseData : function( callback ) {
                                
                                        var self = this,
                                            current,
                                            ready = false,
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language