DamageStudios/rims

View on GitHub

Showing 186 of 250 total issues

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

          getInnerText: function(node) {
            // gets the text we want to use for sorting for a cell.
            // strips leading and trailing whitespace.
            // this is *not* a generic getInnerText function; it's special to sorttable.
            // for example, you can override the cell text with a customkey attribute.

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

            getInnerText: function(node) {
              // gets the text we want to use for sorting for a cell.
              // strips leading and trailing whitespace.
              // this is *not* a generic getInnerText function; it's special to sorttable.
              // for example, you can override the cell text with a customkey attribute.
        Severity: Minor
        Found in app/assets/javascripts/application.js - About 1 hr to fix

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

          jQuery.fn.load = function( url, params, callback ) {
              if ( typeof url !== "string" && _load ) {
                  return _load.apply( this, arguments );
              }
          
          

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

              Modal.prototype.show = function (_relatedTarget) {
                var that = this
                var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
            
                this.$element.trigger(e)

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

              function adjustCSS( elem, prop, valueParts, tween ) {
                  var adjusted,
                      scale = 1,
                      maxIterations = 20,
                      currentValue = tween ?

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

                    setOffset: function( elem, options, i ) {
                        var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
                            position = jQuery.css( elem, "position" ),
                            curElem = jQuery( elem ),
                            props = {};

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

                    Modal.prototype.backdrop = function (callback) {
                      var that = this
                      var animate = this.$element.hasClass('fade') ? 'fade' : ''
                  
                      if (this.isShown && this.options.backdrop) {

                    Consider simplifying this complex logical expression.
                    Open

                        if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
                    
                            // Trust units reported by jQuery.css
                            unit = unit || initialInUnit[ 3 ];
                    
                    

                      Function fixCloneNodeIssues has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function fixCloneNodeIssues( src, dest ) {
                          var nodeName, e, data;
                      
                          // We do not need to do anything for non-Elements
                          if ( dest.nodeType !== 1 ) {

                        Function data has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            data: function( key, value ) {
                                var i, name, data,
                                    elem = this[ 0 ],
                                    attrs = elem && elem.attributes;
                        
                        

                          Function cleanData has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              cleanData: function( elems, /* internal */ forceAcceptData ) {
                                  var elem, type, id, data,
                                      i = 0,
                                      internalKey = jQuery.expando,
                                      cache = jQuery.cache,

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

                                    function dean_addEvent(element, type, handler) {
                                      if (element.addEventListener) {
                                        element.addEventListener(type, handler, false);
                                      } else {
                                        // assign each event handler a unique ID

                            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 dean_addEvent has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                            Open

                                    function dean_addEvent(element, type, handler) {
                                      if (element.addEventListener) {
                                        element.addEventListener(type, handler, false);
                                      } else {
                                        // assign each event handler a unique ID
                            Severity: Minor
                            Found in app/assets/javascripts/application.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 removeClass has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                removeClass: function( value ) {
                                    var classes, elem, cur, curValue, clazz, j, finalValue,
                                        i = 0;
                            
                                    if ( jQuery.isFunction( value ) ) {

                              Function handlers has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  handlers: function( event, handlers ) {
                                      var i, matches, sel, handleObj,
                                          handlerQueue = [],
                                          delegateCount = handlers.delegateCount,
                                          cur = event.target;

                                Function applyPlacement has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  Tooltip.prototype.applyPlacement = function (offset, placement) {
                                    var $tip   = this.tip()
                                    var width  = $tip[0].offsetWidth
                                    var height = $tip[0].offsetHeight
                                
                                

                                  Function promise has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  jQuery.ready.promise = function( obj ) {
                                      if ( !readyList ) {
                                  
                                          readyList = jQuery.Deferred();
                                  
                                  

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

                                      Affix.prototype.checkPosition = function () {
                                        if (!this.$element.is(':visible')) return
                                    
                                        var scrollHeight = $(document).height()
                                        var scrollTop    = this.$target.scrollTop()
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language