kennethkalmer/powerdns-on-rails

View on GitHub

Showing 179 of 179 total issues

File jquery.js has 6116 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery JavaScript Library v1.6.1
 * http://jquery.com/
 *
 * Copyright 2011, John Resig
Severity: Major
Found in public/javascripts/jquery.js - About 2 wks to fix

    Function jQuery has 571 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var jQuery = (function() {
    
    // Define a local copy of jQuery
    var jQuery = function( selector, context ) {
            // The jQuery object is actually just the init constructor 'enhanced'
    Severity: Major
    Found in public/javascripts/jquery.js - About 2 days to fix

      Function ajax has 239 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          ajax: function( url, options ) {
      
              // If url is an object, simulate pre-1.5 signature
              if ( typeof url === "object" ) {
                  options = url;
      Severity: Major
      Found in public/javascripts/jquery.js - About 1 day to fix

        Function tipTip has 152 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            $.fn.tipTip = function(options) {
                var defaults = { 
                    activation: "hover",
                    keepAlive: false,
                    maxWidth: "200px",
        Severity: Major
        Found in public/javascripts/jquery.tipTip.js - About 6 hrs to fix

          Function support has 131 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          jQuery.support = (function() {
          
              var div = document.createElement( "div" ),
                  documentElement = document.documentElement,
                  all,
          Severity: Major
          Found in public/javascripts/jquery.js - About 5 hrs to fix

            Consider simplifying this complex logical expression.
            Open

                    if ( event.pageX == null && event.clientX != null ) {
                        var eventDocument = event.target.ownerDocument || document,
                            doc = eventDocument.documentElement,
                            body = eventDocument.body;
            
            
            Severity: Critical
            Found in public/javascripts/jquery.js - About 5 hrs to fix

              Function Sizzle has 108 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var Sizzle = function( selector, context, results, seed ) {
                  results = results || [];
                  context = context || document;
              
                  var origContext = context;
              Severity: Major
              Found in public/javascripts/jquery.js - About 4 hrs to fix

                Function send has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                                send: function( headers, complete ) {
                
                                    // Get a new xhr
                                    var xhr = s.xhr(),
                                        handle,
                Severity: Major
                Found in public/javascripts/jquery.js - About 3 hrs to fix

                  Function remove has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      remove: function( elem, types, handler, pos ) {
                          // don't do events on text and comment nodes
                          if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
                              return;
                          }
                  Severity: Major
                  Found in public/javascripts/jquery.js - About 3 hrs to fix

                    Function trigger has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        trigger: function( event, data, elem, onlyHandlers ) {
                            // Event object or event type
                            var type = event.type || event,
                                namespaces = [],
                                exclusive;
                    Severity: Major
                    Found in public/javascripts/jquery.js - About 3 hrs to fix

                      Function animate has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          animate: function( prop, speed, easing, callback ) {
                              var optall = jQuery.speed(speed, easing, callback);
                      
                              if ( jQuery.isEmptyObject( prop ) ) {
                                  return this.each( optall.complete, [ false ] );
                      Severity: Major
                      Found in public/javascripts/jquery.js - About 3 hrs to fix

                        Function clean has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            clean: function( elems, context, fragment, scripts ) {
                                var checkScriptType;
                        
                                context = context || document;
                        
                        
                        Severity: Major
                        Found in public/javascripts/jquery.js - About 3 hrs to fix

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

                                  "": function(checkSet, part, isXML){
                                      var nodeCheck,
                                          doneName = done++,
                                          checkFn = dirCheck;
                          
                          
                          Severity: Major
                          Found in public/javascripts/jquery.js and 1 other location - About 3 hrs to fix
                          public/javascripts/jquery.js on lines 4132..4144

                          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 97.

                          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( checkSet, part, isXML ) {
                                      var nodeCheck,
                                          doneName = done++,
                                          checkFn = dirCheck;
                          
                          
                          Severity: Major
                          Found in public/javascripts/jquery.js and 1 other location - About 3 hrs to fix
                          public/javascripts/jquery.js on lines 4118..4130

                          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 97.

                          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

                          Consider simplifying this complex logical expression.
                          Open

                          if ( "getBoundingClientRect" in document.documentElement ) {
                              jQuery.fn.offset = function( options ) {
                                  var elem = this[0], box;
                          
                                  if ( options ) {
                          Severity: Critical
                          Found in public/javascripts/jquery.js - About 3 hrs to fix

                            Function add has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                add: function( elem, types, handler, data ) {
                                    if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
                                        return;
                                    }
                            
                            
                            Severity: Major
                            Found in public/javascripts/jquery.js - About 2 hrs to fix

                              Function active_tiptip has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                              function active_tiptip(){
                                                  opts.enter.call(this);
                                                  tiptip_content.html(org_title);
                                                  tiptip_holder.hide().removeAttr("class").css("margin","0");
                                                  tiptip_arrow.removeAttr("style");
                              Severity: Major
                              Found in public/javascripts/jquery.tipTip.js - About 2 hrs to fix

                                Method create has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  def create
                                    if params[:auth_token].blank?
                                      render :status => 422, :xml => <<-EOS
                                <error>#{t(:message_token_missing_parametr)}</error>
                                EOS
                                Severity: Minor
                                Found in app/controllers/auth_tokens_controller.rb - About 2 hrs 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 filter has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                Sizzle.filter = function( expr, set, inplace, not ) {
                                    var match, anyFound,
                                        old = expr,
                                        result = [],
                                        curLoop = set,
                                Severity: Major
                                Found in public/javascripts/jquery.js - About 2 hrs to fix

                                  Function done has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          function done( status, statusText, responses, headers ) {
                                  
                                              // Called once
                                              if ( state === 2 ) {
                                                  return;
                                  Severity: Major
                                  Found in public/javascripts/jquery.js - About 2 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language