Showing 165 of 196 total issues

Function addClass has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    addClass: function( value ) {
        var classes, elem, cur, clazz, j,
            i = 0,
            len = this.length,
            proceed = typeof value === "string" && value;
Severity: Minor
Found in app/js/jquery.js - About 1 hr to fix

    Function removeClass has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        removeClass: function( value ) {
            var classes, elem, cur, clazz, j,
                i = 0,
                len = this.length,
                proceed = arguments.length === 0 || typeof value === "string" && value;
    Severity: Minor
    Found in app/js/jquery.js - About 1 hr to fix

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

          _createWidget: function( options, element ) {
              element = $( element || this.defaultElement || this )[ 0 ];
              this.element = $( element );
              this.uuid = uuid++;
              this.eventNamespace = "." + this.widgetName + this.uuid;
      Severity: Minor
      Found in app/js/jquery.ui.widget.js - About 1 hr to fix

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

            _initSource: function() {
                var array, url,
                    that = this;
                if ( $.isArray(this.options.source) ) {
                    array = this.options.source;
        Severity: Minor
        Found in app/js/jquery.ui.autocomplete.js - About 1 hr to fix

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

              fix: function( event ) {
                  if ( event[ jQuery.expando ] ) {
                      return event;
                  }
          
          
          Severity: Minor
          Found in app/js/jquery.js - About 1 hr to fix

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

                finish: function( type ) {
                    if ( type !== false ) {
                        type = type || "fx";
                    }
                    return this.each(function() {
            Severity: Minor
            Found in app/js/jquery.js - About 1 hr to fix

              Method license has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                def license(license)
                  uri = URI(license)
                  return license unless uri.scheme == 'http'
                  path = uri.path.to_s.gsub('.html', '').split('/').reject { |p| p.empty? }
                  html_class = path.join('--').gsub(/\./, '-')
              Severity: Minor
              Found in helpers.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 image_attribution has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                def image_attribution(image)
                  agents_by_role = {}
                  if image[:agents].kind_of?(Array)
                    agents_by_role = image[:agents].select{|a| !a[:role].nil?}.map do |a|
                      { a[:role].to_sym => a[:full_name] }
              Severity: Minor
              Found in helpers.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

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

                      setup: function() {
              
                          if ( rformElems.test( this.nodeName ) ) {
                              // IE doesn't fire change on a check/radio until blur; trigger it on click
                              // after a propertychange. Eat the blur-change in special.change.handle.
              Severity: Minor
              Found in app/js/jquery.js - About 1 hr to fix

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

                function propFilter( props, specialEasing ) {
                    var index, name, easing, value, hooks;
                
                    // camelCase, specialEasing and expand cssHook pass
                    for ( index in props ) {
                Severity: Minor
                Found in app/js/jquery.js - About 1 hr to fix

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

                  function getDimensions( elem ) {
                      var raw = elem[0];
                      if ( raw.nodeType === 9 ) {
                          return {
                              width: elem.width(),
                  Severity: Minor
                  Found in app/js/jquery.ui.position.js - About 1 hr to fix

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

                            left: function( position, data ) {
                                var within = data.within,
                                    withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
                                    outerWidth = within.width,
                                    collisionPosLeft = position.left - data.collisionPosition.marginLeft,
                    Severity: Minor
                    Found in app/js/jquery.ui.position.js - About 1 hr to fix

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

                              top: function( position, data ) {
                                  var within = data.within,
                                      withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
                                      outerHeight = data.within.height,
                                      collisionPosTop = position.top - data.collisionPosition.marginTop,
                      Severity: Minor
                      Found in app/js/jquery.ui.position.js - About 1 hr to fix

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

                                "*": [function( prop, value ) {
                                    var tween = this.createTween( prop, value ),
                                        target = tween.cur(),
                                        parts = rfxnum.exec( value ),
                                        unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
                        Severity: Minor
                        Found in app/js/jquery.js - About 1 hr to fix

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

                              off: function( types, selector, fn ) {
                                  var handleObj, type;
                                  if ( types && types.preventDefault && types.handleObj ) {
                                      // ( event )  dispatched jQuery.Event
                                      handleObj = types.handleObj;
                          Severity: Minor
                          Found in app/js/jquery.js - About 1 hr to fix

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

                            jQuery.fn.offset = function( options ) {
                                if ( arguments.length ) {
                                    return options === undefined ?
                                        this :
                                        this.each(function( i ) {
                            Severity: Minor
                            Found in app/js/jquery.js - About 1 hr to fix

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

                                  focus: function( event, item ) {
                                      var nested, focused;
                                      this.blur( event, event && event.type === "focus" );
                              
                                      this._scrollIntoView( item );
                              Severity: Minor
                              Found in app/js/jquery.ui.menu.js - About 1 hr to fix

                                Consider simplifying this complex logical expression.
                                Open

                                if ( jQuery.expr && jQuery.expr.filters ) {
                                    jQuery.expr.filters.hidden = function( elem ) {
                                        // Support: Opera <= 12.12
                                        // Opera reports offsetWidths and offsetHeights less than zero on some elements
                                        return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
                                Severity: Major
                                Found in app/js/jquery.js - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                              if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
                                                      support.getById && context.nodeType === 9 && documentIsHTML &&
                                                      Expr.relative[ tokens[1].type ] ) {
                                  
                                                  context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
                                  Severity: Major
                                  Found in app/js/jquery.js - About 1 hr to fix

                                    Function access has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
                                    Severity: Major
                                    Found in app/js/jquery.js - About 50 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language