ochko/prudge

View on GitHub

Showing 206 of 206 total issues

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

            function buildCache(table) {

                if (table.config.debug) {
                    var cacheTime = new Date();
                }
Severity: Minor
Found in app/assets/javascripts/jquery.tablesorter.js - About 1 hr to fix

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

        html: function( value ) {
            return jQuery.access( this, function( value ) {
                var elem = this[0] || {},
                    i = 0,
                    l = this.length;
    Severity: Minor
    Found in app/assets/javascripts/jquery.js - About 1 hr to fix

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

      jQuery.ready.promise = function( obj ) {
          if ( !readyList ) {
      
              readyList = jQuery.Deferred();
      
      
      Severity: Minor
      Found in app/assets/javascripts/jquery.js - About 1 hr to fix

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

                    function buildParserCache(table, $headers) {
        
                        if (table.config.debug) {
                            var parsersDebug = "";
                        }
        Severity: Minor
        Found in app/assets/javascripts/jquery.tablesorter.js - About 1 hr to fix

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

                      function sortText(a, b) {
                          if (table.config.sortLocaleCompare) return a.localeCompare(b);
                          return ((a < b) ? -1 : ((a > b) ? 1 : 0));
                      };
          Severity: Major
          Found in app/assets/javascripts/jquery.tablesorter.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/jquery.tablesorter.js on lines 671..674

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 58.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

                      function sortTextDesc(a, b) {
                          if (table.config.sortLocaleCompare) return b.localeCompare(a);
                          return ((b < a) ? -1 : ((b > a) ? 1 : 0));
                      };
          Severity: Major
          Found in app/assets/javascripts/jquery.tablesorter.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/jquery.tablesorter.js on lines 666..669

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 58.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

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

              find: function( selector ) {
                  var i, l, length, n, r, ret,
                      self = this;
          
                  if ( typeof selector !== "string" ) {
          Severity: Minor
          Found in app/assets/javascripts/jquery.js - About 1 hr to fix

            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/assets/javascripts/jquery.js - About 1 hr to fix

              Method initialize has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def initialize(user)
                  can :read, Contest
              
                  can :read, Problem do |problem|
                    problem.publicized? || user.owns?(problem)
              Severity: Minor
              Found in app/abilities/coder_ability.rb - About 1 hr to fix

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

                    addClass: function( value ) {
                        var classNames, i, l, elem,
                            setClass, c, cl;
                
                        if ( jQuery.isFunction( value ) ) {
                Severity: Minor
                Found in app/assets/javascripts/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/assets/javascripts/jquery.js - About 1 hr to fix

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                            if ( jQuery.isFunction( html ) ) {
                                return this.each(function(i) {
                                    jQuery(this).wrapInner( html.call(this, i) );
                                });
                            }
                    Severity: Major
                    Found in app/assets/javascripts/jquery.js and 1 other location - About 1 hr to fix
                    app/assets/javascripts/jquery.js on lines 5712..5716

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 56.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                            if ( jQuery.isFunction( html ) ) {
                                return this.each(function(i) {
                                    jQuery(this).wrapAll( html.call(this, i) );
                                });
                            }
                    Severity: Major
                    Found in app/assets/javascripts/jquery.js and 1 other location - About 1 hr to fix
                    app/assets/javascripts/jquery.js on lines 5741..5745

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 56.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    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/assets/javascripts/jquery.js - About 1 hr to fix

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

                        , keydown: function (e) {
                            var $this
                              , $items
                              , $active
                              , $parent
                      Severity: Minor
                      Found in app/assets/javascripts/bootstrap.js - About 1 hr to fix

                        Consider simplifying this complex logical expression.
                        Open

                                        if ( unit !== "px" && start ) {
                                            // Iteratively approximate from a nonzero starting point
                                            // Prefer the current property, because this process will be trivial if it uses the same units
                                            // Fallback to end or a simple constant
                                            start = jQuery.css( tween.elem, prop, true ) || end || 1;
                        Severity: Major
                        Found in app/assets/javascripts/jquery.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 ) {
                                  return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none");
                              };
                          
                          
                          Severity: Major
                          Found in app/assets/javascripts/jquery.js - About 1 hr to fix

                            Consider simplifying this complex logical expression.
                            Open

                                            if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
                            
                                                event.data = handleObj.data;
                                                event.handleObj = handleObj;
                            
                            
                            Severity: Major
                            Found in app/assets/javascripts/jquery.js - About 1 hr to fix

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                    this.timeout = setTimeout(function() {
                                      if (self.hoverState == 'out') self.hide()
                                    }, self.options.delay.hide)
                              Severity: Major
                              Found in app/assets/javascripts/bootstrap.js and 1 other location - About 1 hr to fix
                              app/assets/javascripts/bootstrap.js on lines 1142..1144

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 55.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                      "odd": createPositionalPseudo(function( matchIndexes, length ) {
                                          for ( var i = 1; i < length; i += 2 ) {
                                              matchIndexes.push( i );
                                          }
                                          return matchIndexes;
                              Severity: Major
                              Found in app/assets/javascripts/jquery.js and 1 other location - About 1 hr to fix
                              app/assets/javascripts/jquery.js on lines 4530..4535

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 55.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Severity
                              Category
                              Status
                              Source
                              Language