angelakuo/citydogshare

View on GitHub

Showing 3,976 of 3,976 total issues

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

        reset: function() {
          $field
            .each(function () {
              var
                $field       = $(this),

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

        Lexer.prototype.tokenize = function(code, opts) {
          var consumed, end, i, ref2;
          if (opts == null) {
            opts = {};
          }

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

          Class.prototype.compileNode = function(o) {
            var args, argumentsNode, func, jumpNode, klass, lname, name, ref3, superClass;
            if (jumpNode = this.body.jumps()) {
              jumpNode.error('Class bodies cannot contain pure statements');
            }

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

            Param.prototype.eachName = function(iterator, name) {
              var atParam, j, len1, node, obj, ref3;
              if (name == null) {
                name = this.name;
              }

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

              clone: function( elem, dataAndEvents, deepDataAndEvents ) {
                  var destElements, node, clone, i, srcElements,
                      inPage = jQuery.contains( elem.ownerDocument, elem );
          
                  if ( support.html5Clone || jQuery.isXMLDoc( elem ) ||

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

                dispatch: function( event ) {
            
                    // Make a writable jQuery.Event from the native event object
                    event = jQuery.event.fix( event );
            
            

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

              getJasmineRequireObj().toThrow = function(j$) {
              
                var getErrorMsg = j$.formatErrorMsg('<toThrow>', 'expect(function() {<expectation>}).toThrow()');
              
                function toThrow(util) {

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

                    function processNode(node, parentEnabled) {
                      var executableIndex = runnableIndex(node.id);
                
                      if (executableIndex !== undefined) {
                        parentEnabled = true;

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

                                              item: function( targetDate ) {
                  
                                                  // Convert the time date from a relative date to a target date.
                                                  targetDate = calendar.create([ viewsetObject.year, viewsetObject.month, targetDate + ( settings.firstDay ? 1 : 0 ) ])
                  
                  

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

                      function QueryString(options) {
                    
                        this.navigateWithNewParam = function(key, value) {
                          options.getWindowLocation().search = this.fullStringWithNewParam(key, value);
                        };

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

                          function units_month__handleStrictParse(monthName, format, strict) {
                              var i, ii, mom, llc = monthName.toLocaleLowerCase();
                              if (!this._monthsParse) {
                                  // this is not used
                                  this._monthsParse = [];

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

                        return $.effects.effect.clip = function( o, done ) {
                            // Create element
                            var el = $( this ),
                                props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
                                mode = $.effects.setMode( el, o.mode || "hide" ),

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

                          return $.effects.effect.clip = function( o, done ) {
                              // Create element
                              var el = $( this ),
                                  props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
                                  mode = $.effects.setMode( el, o.mode || "hide" ),

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

                                    enter: function( callback ) {
                            
                                        fullscreen.beforeEnter(function() {
                            
                                            callback = fullscreen.parseCallback( callback, true );

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

                                                          item: function( targetDate ) {
                              
                                                              // Convert the time date from a relative date to a target date.
                                                              targetDate = calendar.create([ viewsetObject.year, viewsetObject.month, targetDate + ( settings.firstDay ? 1 : 0 ) ])
                              
                              

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

                                                            item: function( targetDate ) {
                                
                                                                // Convert the time date from a relative date to a target date.
                                                                targetDate = calendar.create([ viewsetObject.year, viewsetObject.month, targetDate + ( settings.firstDay ? 1 : 0 ) ])
                                
                                

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

                                  var effectClip = $.effects.effect.clip = function( o, done ) {
                                      // Create element
                                      var el = $( this ),
                                          props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
                                          mode = $.effects.setMode( el, o.mode || "hide" ),

                                    Function toHaveBeenCalledTimes has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    getJasmineRequireObj().toHaveBeenCalledTimes = function(j$) {
                                    
                                      var getErrorMsg = j$.formatErrorMsg('<toHaveBeenCalledTimes>', 'expect(<spyObj>).toHaveBeenCalledTimes(<Number>)');
                                    
                                      function toHaveBeenCalledTimes() {

                                    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

                                    Method no_overlap has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                    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 - 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

                                    Method edit has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                    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 - 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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language