ianheggie/cruisecontrol.rb

View on GitHub
public/javascripts/jquery-ui/development-bundle/external/qunit.js

Summary

Maintainability
F
1 wk
Test Coverage

File qunit.js has 1128 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * QUnit - A JavaScript Unit Testing Framework
 *
 * http://docs.jquery.com/QUnit
 *
Severity: Major
Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 2 days to fix

    Function jsDump has 148 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    QUnit.jsDump = (function() {
        function quote( str ) {
            return '"' + str.toString().replace(/"/g, '\\"') + '"';
        };
        function literal( o ) {
    Severity: Major
    Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 5 hrs to fix

      Function equiv has 117 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      QUnit.equiv = function () {
      
          var innerEquiv; // the real equiv function
          var callers = []; // stack to decide between skip/abort functions
          var parents = []; // stack to avoiding loops from circular referencing
      Severity: Major
      Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 4 hrs to fix

        Function diff has 107 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        QUnit.diff = (function() {
            function diff(o, n){
                var ns = new Object();
                var os = new Object();
        
        
        Severity: Major
        Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 4 hrs to fix

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

              var callbacks = function () {
          
                  // for string, boolean, number and null
                  function useStrictEquality(b, a) {
                      if (b instanceof a.constructor || a instanceof b.constructor) {
          Severity: Major
          Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 3 hrs to fix

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

                finish: function() {
                    if ( this.expected && this.expected != this.assertions.length ) {
                        QUnit.ok( false, "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run" );
                    }
            
            
            Severity: Major
            Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 3 hrs to fix

              Function diff has 60 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function diff(o, n){
                      var ns = new Object();
                      var os = new Object();
              
                      for (var i = 0; i < n.length; i++) {
              Severity: Major
              Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 2 hrs to fix

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

                function done() {
                    config.autorun = true;
                
                    // Log the last module results
                    if ( config.currentModule ) {
                Severity: Minor
                Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 1 hr to fix

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

                      setup: function() {
                          if (this.module != config.previousModule) {
                              if ( config.previousModule ) {
                                  QUnit.moduleDone( {
                                      name: config.previousModule,
                  Severity: Minor
                  Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 1 hr to fix

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

                        init: function() {
                            extend(config, {
                                stats: { all: 0, bad: 0 },
                                moduleStats: { all: 0, bad: 0 },
                                started: +new Date,
                    Severity: Minor
                    Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 1 hr to fix

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

                          push: function(result, actual, expected, message) {
                              var details = {
                                  result: result,
                                  message: message,
                                  actual: actual,
                      Severity: Minor
                      Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 1 hr to fix

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

                            objectType: function( obj ) {
                                if (typeof obj === "undefined") {
                                        return "undefined";
                        
                                // consider: typeof null === object
                        Severity: Minor
                        Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 1 hr to fix

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

                                      "object": function (b, a) {
                                          var i, j, loop;
                                          var eq = true; // unless we can proove it
                                          var aProperties = [], bProperties = []; // collection of strings
                          
                          
                          Severity: Minor
                          Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 1 hr to fix

                            Function Test has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            var Test = function(name, testName, expected, testEnvironmentArg, async, callback) {
                            Severity: Minor
                            Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 45 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                              return "object";
                              Severity: Major
                              Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                        return undefined;
                                Severity: Major
                                Found in public/javascripts/jquery-ui/development-bundle/external/qunit.js - About 30 mins to fix

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

                                              if (n[i].text != null && n[i + 1].text == null && n[i].row + 1 < o.length && o[n[i].row + 1].text == null &&
                                              n[i + 1] == o[n[i].row + 1]) {
                                                  n[i + 1] = {
                                                      text: n[i + 1],
                                                      row: n[i].row + 1
                                  public/javascripts/jquery-ui/development-bundle/external/qunit.js on lines 1376..1386

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

                                  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 (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null &&
                                              n[i - 1] == o[n[i].row - 1]) {
                                                  n[i - 1] = {
                                                      text: n[i - 1],
                                                      row: n[i].row - 1
                                  public/javascripts/jquery-ui/development-bundle/external/qunit.js on lines 1362..1372

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

                                  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

                                          for (var i = 0; i < n.length; i++) {
                                              if (ns[n[i]] == null)
                                                  ns[n[i]] = {
                                                      rows: new Array(),
                                                      o: null
                                  public/javascripts/jquery-ui/development-bundle/external/qunit.js on lines 1339..1346

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

                                  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

                                          for (var i = 0; i < o.length; i++) {
                                              if (os[o[i]] == null)
                                                  os[o[i]] = {
                                                      rows: new Array(),
                                                      n: null
                                  public/javascripts/jquery-ui/development-bundle/external/qunit.js on lines 1330..1337

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

                                  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 ( config.currentModule ) {
                                          QUnit.moduleDone( {
                                              name: config.currentModule,
                                              failed: config.moduleStats.bad,
                                              passed: config.moduleStats.all - config.moduleStats.bad,
                                  public/javascripts/jquery-ui/development-bundle/external/qunit.js on lines 50..57

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

                                  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 ( config.previousModule ) {
                                                  QUnit.moduleDone( {
                                                      name: config.previousModule,
                                                      failed: config.moduleStats.bad,
                                                      passed: config.moduleStats.all - config.moduleStats.bad,
                                  public/javascripts/jquery-ui/development-bundle/external/qunit.js on lines 747..754

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

                                  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

                                                  o[os[i].rows[0]] = {
                                                      text: o[os[i].rows[0]],
                                                      row: ns[i].rows[0]
                                                  };
                                  public/javascripts/jquery-ui/development-bundle/external/qunit.js on lines 1350..1353

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

                                  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

                                                  n[ns[i].rows[0]] = {
                                                      text: n[ns[i].rows[0]],
                                                      row: os[i].rows[0]
                                                  };
                                  public/javascripts/jquery-ui/development-bundle/external/qunit.js on lines 1354..1357

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

                                  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

                                              a.href = QUnit.url({ filter: getText([b]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") });
                                  public/javascripts/jquery-ui/development-bundle/external/qunit.js on lines 186..186

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

                                  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

                                                      window.location = QUnit.url({ filter: getText([target]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") });
                                  public/javascripts/jquery-ui/development-bundle/external/qunit.js on lines 172..172

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

                                  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

                                  There are no issues that match your filters.

                                  Category
                                  Status