kennethkalmer/powerdns-on-rails

View on GitHub

Showing 179 of 179 total issues

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

    find: function( selector ) {
        var self = this,
            i, l;

        if ( typeof selector !== "string" ) {
Severity: Minor
Found in public/javascripts/jquery.js - About 1 hr to fix

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

            ATTR: function( elem, match ) {
                var name = match[1],
                    result = Expr.attrHandle[ name ] ?
                        Expr.attrHandle[ name ]( elem ) :
                        elem[ name ] != null ?
    Severity: Minor
    Found in public/javascripts/jquery.js - About 1 hr to fix

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

          jQuery.fn[ name ] = function( type, data, fn ) {
              var handler;
      
              // Handle object literals
              if ( typeof type === "object" ) {
      Severity: Minor
      Found in public/javascripts/jquery.js - About 1 hr to fix

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

            style: function( elem, name, value, extra ) {
                // Don't set styles on text and comment nodes
                if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
                    return;
                }
        Severity: Minor
        Found in public/javascripts/jquery.js - About 1 hr to fix

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

              jQuery.fn[ type ] = function( size ) {
                  // Get window width or height
                  var elem = this[0];
                  if ( !elem ) {
                      return size == null ? null : this;
          Severity: Minor
          Found in public/javascripts/jquery.js - About 1 hr to fix

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

                show: function( speed, easing, callback ) {
                    var elem, display;
            
                    if ( speed || speed === 0 ) {
                        return this.animate( genFx("show", 3), speed, easing, callback);
            Severity: Minor
            Found in public/javascripts/jquery.js - About 1 hr to fix

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

                  addClass: function( value ) {
                      if ( jQuery.isFunction( value ) ) {
                          return this.each(function(i) {
                              var self = jQuery(this);
                              self.addClass( value.call(this, i, self.attr("class") || "") );
              Severity: Minor
              Found in public/javascripts/jquery.js - About 1 hr to fix

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

                    custom: function( from, to, unit ) {
                        var self = this,
                            fx = jQuery.fx,
                            raf;
                
                
                Severity: Minor
                Found in public/javascripts/jquery.js - About 1 hr to fix

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

                      html: function( value ) {
                          if ( value === undefined ) {
                              return this[0] && this[0].nodeType === 1 ?
                                  this[0].innerHTML.replace(rinlinejQuery, "") :
                                  null;
                  Severity: Minor
                  Found in public/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 public/javascripts/jquery.js and 1 other location - About 1 hr to fix
                    public/javascripts/jquery.js on lines 5504..5508

                    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

                            reset: function( elem ) {
                                var name = elem.nodeName.toLowerCase();
                                return (name === "input" || name === "button") && "reset" === elem.type;
                            },
                    Severity: Major
                    Found in public/javascripts/jquery.js and 1 other location - About 1 hr to fix
                    public/javascripts/jquery.js on lines 4346..4349

                    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 public/javascripts/jquery.js and 1 other location - About 1 hr to fix
                    public/javascripts/jquery.js on lines 5533..5537

                    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

                            submit: function( elem ) {
                                var name = elem.nodeName.toLowerCase();
                                return (name === "input" || name === "button") && "submit" === elem.type;
                            },
                    Severity: Major
                    Found in public/javascripts/jquery.js and 1 other location - About 1 hr to fix
                    public/javascripts/jquery.js on lines 4355..4358

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

                    Sizzle.find = function( expr, context, isXML ) {
                        var set;
                    
                        if ( !expr ) {
                            return [];
                    Severity: Minor
                    Found in public/javascripts/jquery.js - About 1 hr to fix

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

                              ">": function( checkSet, part ) {
                                  var elem,
                                      isPartStr = typeof part === "string",
                                      i = 0,
                                      l = checkSet.length;
                      Severity: Minor
                      Found in public/javascripts/jquery.js - About 1 hr to fix

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

                            handle: function( event ) {
                                event = jQuery.event.fix( event || window.event );
                                // Snapshot the handlers list since a called handler may add/remove events.
                                var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []).slice(0),
                                    run_all = !event.exclusive && !event.namespace,
                        Severity: Minor
                        Found in public/javascripts/jquery.js - About 1 hr to fix

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

                          function cloneFixAttributes( src, dest ) {
                              var nodeName;
                          
                              // We do not need to do anything for non-Elements
                              if ( dest.nodeType !== 1 ) {
                          Severity: Minor
                          Found in public/javascripts/jquery.js - About 1 hr to fix

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

                                toggleClass: function( value, stateVal ) {
                                    var type = typeof value,
                                        isBool = typeof stateVal === "boolean";
                            
                                    if ( jQuery.isFunction( value ) ) {
                            Severity: Minor
                            Found in public/javascripts/jquery.js - About 1 hr to fix

                              Method build has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                              Open

                                def build( domain_name = nil )
                                  # get the class of the record_type
                                  record_class = self.record_type.constantize
                              
                                  # duplicate our own attributes, strip out the ones the destination doesn't
                              Severity: Minor
                              Found in app/models/record_template.rb - About 55 mins 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 can_change? has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                              Open

                                def can_change?( record, type = '*' )
                                  name, type = get_name_and_type_from_param( record, type )
                              
                                  # NS records?
                                  return false if type == 'NS' || type == 'SOA'
                              Severity: Minor
                              Found in app/models/auth_token.rb - About 55 mins 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