jquery/jquery

View on GitHub
external/qunit/qunit.js

Summary

Maintainability
F
1 mo
Test Coverage

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

/*!
 * QUnit 2.9.2
 * https://qunitjs.com/
 *
 * Copyright jQuery Foundation and other contributors
Severity: Major
Found in external/qunit/qunit.js - About 1 wk to fix

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

      QUnit.diff = function () {
          function DiffMatchPatch() {}
    
          //  DIFF FUNCTIONS
    
    
    Severity: Major
    Found in external/qunit/qunit.js - About 3 days to fix

      Function Assert has 327 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        var Assert = function () {
            function Assert(testContext) {
                classCallCheck(this, Assert);
      
                this.test = testContext;
      Severity: Major
      Found in external/qunit/qunit.js - About 1 day to fix

        Function dump has 222 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          var dump = (function () {
              function quote(str) {
                  return "\"" + str.toString().replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\"";
              }
              function literal(o) {
        Severity: Major
        Found in external/qunit/qunit.js - About 1 day to fix

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

            var equiv = (function () {
          
                // Value pairs queued for comparison. Used for breadth-first processing order, recursion
                // detection and avoiding repeated comparison (see below for details).
                // Elements are { a: val, b: val }.
          Severity: Major
          Found in external/qunit/qunit.js - About 7 hrs to fix

            Function toolbarModuleFilter has 122 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  function toolbarModuleFilter() {
                      var commit,
                          reset,
                          moduleFilter = document.createElement("form"),
                          label = document.createElement("label"),
            Severity: Major
            Found in external/qunit/qunit.js - About 4 hrs to fix

              Function SuiteReport has 112 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                var SuiteReport = function () {
                    function SuiteReport(name, parentSuite) {
                        classCallCheck(this, SuiteReport);
              
                        this.name = name;
              Severity: Major
              Found in external/qunit/qunit.js - About 4 hrs to fix

                Function TestReport has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  var TestReport = function () {
                      function TestReport(name, suite, options) {
                          classCallCheck(this, TestReport);
                
                          this.name = name;
                Severity: Major
                Found in external/qunit/qunit.js - About 3 hrs to fix

                  Function diffCleanupMerge has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        DiffMatchPatch.prototype.diffCleanupMerge = function (diffs) {
                            var pointer, countDelete, countInsert, textInsert, textDelete, commonlength, changes, diffPointer, position;
                            diffs.push([DIFF_EQUAL, ""]); // Add a dummy entry at the end.
                            pointer = 0;
                            countDelete = 0;
                  Severity: Major
                  Found in external/qunit/qunit.js - About 3 hrs to fix

                    Function Enumerator has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      var Enumerator = function () {
                        function Enumerator(Constructor, input) {
                          classCallCheck(this, Enumerator);
                    
                          this._instanceConstructor = Constructor;
                    Severity: Major
                    Found in external/qunit/qunit.js - About 3 hrs to fix

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

                            finish: function finish() {
                                config.current = this;
                      
                                // Release the test callback to ensure that anything referenced has been
                                // released to be garbage collected.
                      Severity: Major
                      Found in external/qunit/qunit.js - About 3 hrs to fix

                        Function diffBisect has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              DiffMatchPatch.prototype.diffBisect = function (text1, text2, deadline) {
                                  var text1Length, text2Length, maxD, vOffset, vLength, v1, v2, x, delta, front, k1start, k1end, k2start, k2end, k2Offset, k1Offset, x1, x2, y1, y2, d, k1, k2;
                        
                                  // Cache the text lengths to prevent multiple calls.
                                  text1Length = text1.length;
                        Severity: Major
                        Found in external/qunit/qunit.js - About 3 hrs to fix

                          Function diffCleanupSemantic has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                DiffMatchPatch.prototype.diffCleanupSemantic = function (diffs) {
                                    var changes, equalities, equalitiesLength, lastequality, pointer, lengthInsertions2, lengthDeletions2, lengthInsertions1, lengthDeletions1, deletion, insertion, overlapLength1, overlapLength2;
                                    changes = false;
                                    equalities = []; // Stack of indices where equalities are found.
                                    equalitiesLength = 0; // Keeping our own length var is faster in JS.
                          Severity: Major
                          Found in external/qunit/qunit.js - About 2 hrs to fix

                            Function rejects has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                      value: function rejects(promise, expected, message) {
                                          var result = false;
                            
                                          var currentTest = this instanceof Assert && this.test || config.current;
                            
                            
                            Severity: Major
                            Found in external/qunit/qunit.js - About 2 hrs to fix

                              Function toolbarChanged has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                    function toolbarChanged() {
                                        var updatedUrl,
                                            value,
                                            tests,
                                            field = this,
                              Severity: Major
                              Found in external/qunit/qunit.js - About 2 hrs to fix

                                Function diffHalfMatch has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                      DiffMatchPatch.prototype.diffHalfMatch = function (text1, text2) {
                                          var longtext, shorttext, dmp, text1A, text2B, text2A, text1B, midCommon, hm1, hm2, hm;
                                
                                          longtext = text1.length > text2.length ? text1 : text2;
                                          shorttext = text1.length > text2.length ? text2 : text1;
                                Severity: Major
                                Found in external/qunit/qunit.js - About 2 hrs to fix

                                  Function diffCleanupEfficiency has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                        DiffMatchPatch.prototype.diffCleanupEfficiency = function (diffs) {
                                            var changes, equalities, equalitiesLength, lastequality, pointer, preIns, preDel, postIns, postDel;
                                            changes = false;
                                            equalities = []; // Stack of indices where equalities are found.
                                            equalitiesLength = 0; // Keeping our own length var is faster in JS.
                                  Severity: Minor
                                  Found in external/qunit/qunit.js - About 1 hr to fix

                                    Function diffLineMode has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                          DiffMatchPatch.prototype.diffLineMode = function (text1, text2, deadline) {
                                              var a, diffs, linearray, pointer, countInsert, countDelete, textInsert, textDelete, j;
                                    
                                              // Scan the text on a line-by-line basis first.
                                              a = this.diffLinesToChars(text1, text2);
                                    Severity: Minor
                                    Found in external/qunit/qunit.js - About 1 hr to fix

                                      Function Test has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        function Test(settings) {
                                            var i, l;
                                      
                                            ++Test.count;
                                      
                                      
                                      Severity: Minor
                                      Found in external/qunit/qunit.js - About 1 hr to fix

                                        Function getUrlConfigHtml has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                              function getUrlConfigHtml() {
                                                  var i,
                                                      j,
                                                      val,
                                                      escaped,
                                        Severity: Minor
                                        Found in external/qunit/qunit.js - About 1 hr to fix

                                          Function throws has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                                    value: function throws(block, expected, message) {
                                                        var actual = void 0,
                                                            result = false;
                                          
                                                        var currentTest = this instanceof Assert && this.test || config.current;
                                          Severity: Minor
                                          Found in external/qunit/qunit.js - About 1 hr to fix

                                            Function processModule has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                              function processModule(name, options, executeNow) {
                                                  var modifiers = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
                                            
                                                  if (objectType(options) === "function") {
                                                      executeNow = options;
                                            Severity: Minor
                                            Found in external/qunit/qunit.js - About 1 hr to fix

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

                                                    DiffMatchPatch.prototype.diffCompute = function (text1, text2, checklines, deadline) {
                                                        var diffs, longtext, shorttext, i, hm, text1A, text2A, text1B, text2B, midCommon, diffsA, diffsB;
                                              
                                                        if (!text1) {
                                              
                                              
                                              Severity: Minor
                                              Found in external/qunit/qunit.js - About 1 hr to fix

                                                Function Promise$2 has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                  var Promise$2 = function () {
                                                    function Promise(resolver) {
                                                      classCallCheck(this, Promise);
                                                
                                                      this[PROMISE_ID] = nextId();
                                                Severity: Minor
                                                Found in external/qunit/qunit.js - About 1 hr to fix

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

                                                        DiffMatchPatch.prototype.diffLinesToChars = function (text1, text2) {
                                                            var lineArray, lineHash, chars1, chars2;
                                                            lineArray = []; // E.g. lineArray[4] === 'Hello\n'
                                                            lineHash = {}; // E.g. lineHash['Hello\n'] === 4
                                                  
                                                  
                                                  Severity: Minor
                                                  Found in external/qunit/qunit.js - About 1 hr to fix

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

                                                      function done() {
                                                          var storage = config.storage;
                                                    
                                                          ProcessingQueue.finished = true;
                                                    
                                                    
                                                    Severity: Minor
                                                    Found in external/qunit/qunit.js - About 1 hr to fix

                                                      Function valid has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                            valid: function valid() {
                                                                var filter = config.filter,
                                                                    regexFilter = /^(!?)\/([\w\W]*)\/(i?$)/.exec(filter),
                                                                    module = config.module && config.module.toLowerCase(),
                                                                    fullName = this.module.name + ": " + this.testName;
                                                      Severity: Minor
                                                      Found in external/qunit/qunit.js - About 1 hr to fix

                                                        Function invokeCallback has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                          function invokeCallback(settled, promise, callback, detail) {
                                                            var hasCallback = isFunction(callback),
                                                                value = void 0,
                                                                error = void 0,
                                                                succeeded = void 0,
                                                        Severity: Minor
                                                        Found in external/qunit/qunit.js - About 1 hr to fix

                                                          Function DiffMain has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                                DiffMatchPatch.prototype.DiffMain = function (text1, text2, optChecklines) {
                                                                    var deadline, checklines, commonlength, commonprefix, commonsuffix, diffs;
                                                          
                                                                    // The diff must be complete in up to 1 second.
                                                                    deadline = new Date().getTime() + 1000;
                                                          Severity: Minor
                                                          Found in external/qunit/qunit.js - About 1 hr to fix

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

                                                                  before: function before() {
                                                                      var _this = this;
                                                            
                                                                      var module = this.module,
                                                                          notStartedModules = getNotStartedModules(module);
                                                            Severity: Minor
                                                            Found in external/qunit/qunit.js - About 1 hr to fix

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

                                                                            object: function object(map, stack) {
                                                                                var keys,
                                                                                    key,
                                                                                    val,
                                                                                    i,
                                                              Severity: Minor
                                                              Found in external/qunit/qunit.js - About 1 hr to fix

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

                                                                      DiffMatchPatch.prototype.diffCommonOverlap = function (text1, text2) {
                                                                          var text1Length, text2Length, textLength, best, length, pattern, found;
                                                                
                                                                          // Cache the text lengths to prevent multiple calls.
                                                                          text1Length = text1.length;
                                                                Severity: Minor
                                                                Found in external/qunit/qunit.js - About 1 hr to fix

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

                                                                        pushResult: function pushResult(resultInfo) {
                                                                            if (this !== config.current) {
                                                                                throw new Error("Assertion occurred after test had finished.");
                                                                            }
                                                                  
                                                                  
                                                                  Severity: Minor
                                                                  Found in external/qunit/qunit.js - About 1 hr to fix

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

                                                                      function internalStart(test) {
                                                                    
                                                                          // If semaphore is non-numeric, throw error
                                                                          if (isNaN(test.semaphore)) {
                                                                              test.semaphore = 0;
                                                                    Severity: Minor
                                                                    Found in external/qunit/qunit.js - About 1 hr to fix

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

                                                                        function objectType(obj) {
                                                                            if (typeof obj === "undefined") {
                                                                                return "undefined";
                                                                            }
                                                                      
                                                                      
                                                                      Severity: Minor
                                                                      Found in external/qunit/qunit.js - About 1 hr to fix

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

                                                                                      }, function handleRejection(actual) {
                                                                                          var expectedType = objectType(expected);
                                                                        
                                                                                          // We don't want to validate
                                                                                          if (expected === undefined) {
                                                                        Severity: Minor
                                                                        Found in external/qunit/qunit.js - About 1 hr to fix

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

                                                                                queueHook: function queueHook(hook, hookName, hookOwner) {
                                                                                    var _this2 = this;
                                                                          
                                                                                    var callHook = function callHook() {
                                                                                        var promise = hook.call(_this2.testEnvironment, _this2.assert);
                                                                          Severity: Minor
                                                                          Found in external/qunit/qunit.js - About 1 hr to fix

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

                                                                              function internalStop(test) {
                                                                                  var released = false;
                                                                                  test.semaphore += 1;
                                                                                  config.blocking = true;
                                                                            
                                                                            
                                                                            Severity: Minor
                                                                            Found in external/qunit/qunit.js - About 1 hr to fix

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

                                                                                        function selectionChange(evt) {
                                                                                            var i,
                                                                                                item,
                                                                                                checkbox = evt && evt.target || allCheckbox,
                                                                                                modulesList = dropDownList.getElementsByTagName("input"),
                                                                              Severity: Minor
                                                                              Found in external/qunit/qunit.js - About 1 hr to fix

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

                                                                                  function createModule(name, testEnvironment, modifiers) {
                                                                                      var parentModule = moduleStack.length ? moduleStack.slice(-1)[0] : null;
                                                                                      var moduleName = parentModule !== null ? [parentModule.name, name].join(" > ") : name;
                                                                                      var parentSuite = parentModule ? parentModule.suiteReport : globalSuite;
                                                                                
                                                                                
                                                                                Severity: Minor
                                                                                Found in external/qunit/qunit.js - About 1 hr to fix

                                                                                  Function set$$1 has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                  Open

                                                                                            "set": function set$$1(a, b) {
                                                                                                var innerEq,
                                                                                                    outerEq = true;
                                                                                  
                                                                                                if (a.size !== b.size) {
                                                                                  Severity: Minor
                                                                                  Found in external/qunit/qunit.js - About 1 hr to fix

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

                                                                                              "map": function map(a, b) {
                                                                                                  var innerEq,
                                                                                                      outerEq = true;
                                                                                    
                                                                                                  if (a.size !== b.size) {
                                                                                    Severity: Minor
                                                                                    Found in external/qunit/qunit.js - About 1 hr to fix

                                                                                      Consider simplifying this complex logical expression.
                                                                                      Open

                                                                                                        if (lastequality && (preIns && preDel && postIns && postDel || lastequality.length < 2 && preIns + preDel + postIns + postDel === 3)) {
                                                                                      
                                                                                                            // Duplicate record.
                                                                                                            diffs.splice(equalities[equalitiesLength - 1], 0, [DIFF_DELETE, lastequality]);
                                                                                      
                                                                                      
                                                                                      Severity: Major
                                                                                      Found in external/qunit/qunit.js - About 1 hr to fix

                                                                                        Avoid deeply nested control flow statements.
                                                                                        Open

                                                                                                                      if (commonlength !== 0) {
                                                                                                                          if (pointer - countDelete - countInsert > 0 && diffs[pointer - countDelete - countInsert - 1][0] === DIFF_EQUAL) {
                                                                                                                              diffs[pointer - countDelete - countInsert - 1][1] += textInsert.substring(0, commonlength);
                                                                                                                          } else {
                                                                                                                              diffs.splice(0, 0, [DIFF_EQUAL, textInsert.substring(0, commonlength)]);
                                                                                        Severity: Major
                                                                                        Found in external/qunit/qunit.js - About 45 mins to fix

                                                                                          Avoid deeply nested control flow statements.
                                                                                          Open

                                                                                                                    if (test && test.className.indexOf("pass") > -1) {
                                                                                                                        hiddenTests.push(test);
                                                                                                                    }
                                                                                          Severity: Major
                                                                                          Found in external/qunit/qunit.js - About 45 mins to fix

                                                                                            Avoid deeply nested control flow statements.
                                                                                            Open

                                                                                                                      if (x1 >= x2) {
                                                                                            
                                                                                                                          // Overlap detected.
                                                                                                                          return this.diffBisectSplit(text1, text2, x1, y1, deadline);
                                                                                                                      }
                                                                                            Severity: Major
                                                                                            Found in external/qunit/qunit.js - About 45 mins to fix

                                                                                              Avoid deeply nested control flow statements.
                                                                                              Open

                                                                                                                        if (hasOwn.call(val.value, j)) {
                                                                                                                            urlConfigHtml += "<option value='" + escapeText(j) + "'" + (config[val.id] === j ? (selection = true) && " selected='selected'" : "") + ">" + escapeText(val.value[j]) + "</option>";
                                                                                                                        }
                                                                                              Severity: Major
                                                                                              Found in external/qunit/qunit.js - About 45 mins to fix

                                                                                                Avoid deeply nested control flow statements.
                                                                                                Open

                                                                                                                          if (x1 >= x2) {
                                                                                                
                                                                                                                              // Overlap detected.
                                                                                                                              return this.diffBisectSplit(text1, text2, x1, y1, deadline);
                                                                                                                          }
                                                                                                Severity: Major
                                                                                                Found in external/qunit/qunit.js - About 45 mins to fix

                                                                                                  Avoid deeply nested control flow statements.
                                                                                                  Open

                                                                                                                                if (commonlength !== 0) {
                                                                                                                                    diffs[pointer][1] = textInsert.substring(textInsert.length - commonlength) + diffs[pointer][1];
                                                                                                                                    textInsert = textInsert.substring(0, textInsert.length - commonlength);
                                                                                                                                    textDelete = textDelete.substring(0, textDelete.length - commonlength);
                                                                                                                                }
                                                                                                  Severity: Major
                                                                                                  Found in external/qunit/qunit.js - About 45 mins to fix

                                                                                                    Function diffBisectSplit has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                    Open

                                                                                                          DiffMatchPatch.prototype.diffBisectSplit = function (text1, text2, x, y, deadline) {
                                                                                                    Severity: Minor
                                                                                                    Found in external/qunit/qunit.js - About 35 mins to fix

                                                                                                      Function value has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                      Open

                                                                                                                value: function push(result, actual, expected, message, negative) {
                                                                                                      Severity: Minor
                                                                                                      Found in external/qunit/qunit.js - About 35 mins to fix

                                                                                                        Function onerror has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                              window$1.onerror = function (message, fileName, lineNumber, columnNumber, errorObj) {
                                                                                                        Severity: Minor
                                                                                                        Found in external/qunit/qunit.js - About 35 mins to fix

                                                                                                          Avoid too many return statements within this function.
                                                                                                          Open

                                                                                                                        return diffsA.concat([[DIFF_EQUAL, midCommon]], diffsB);
                                                                                                          Severity: Major
                                                                                                          Found in external/qunit/qunit.js - About 30 mins to fix

                                                                                                            Avoid too many return statements within this function.
                                                                                                            Open

                                                                                                                      return resultErrorString;
                                                                                                            Severity: Major
                                                                                                            Found in external/qunit/qunit.js - About 30 mins to fix

                                                                                                              Avoid too many return statements within this function.
                                                                                                              Open

                                                                                                                        return regexFilter ? this.regexFilter(!!regexFilter[1], regexFilter[2], regexFilter[3], fullName) : this.stringFilter(filter, fullName);
                                                                                                              Severity: Major
                                                                                                              Found in external/qunit/qunit.js - About 30 mins to fix

                                                                                                                Avoid too many return statements within this function.
                                                                                                                Open

                                                                                                                          return this.diffBisect(text1, text2, deadline);
                                                                                                                Severity: Major
                                                                                                                Found in external/qunit/qunit.js - About 30 mins to fix

                                                                                                                  Avoid too many return statements within this function.
                                                                                                                  Open

                                                                                                                                return true;
                                                                                                                  Severity: Major
                                                                                                                  Found in external/qunit/qunit.js - About 30 mins to fix

                                                                                                                    Avoid too many return statements within this function.
                                                                                                                    Open

                                                                                                                                  return this.diffLineMode(text1, text2, deadline);
                                                                                                                    Severity: Major
                                                                                                                    Found in external/qunit/qunit.js - About 30 mins to fix

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

                                                                                                                                        if (k2 === -d || k2 !== d && v2[k2Offset - 1] < v2[k2Offset + 1]) {
                                                                                                                                            x2 = v2[k2Offset + 1];
                                                                                                                                        } else {
                                                                                                                                            x2 = v2[k2Offset - 1] + 1;
                                                                                                                                        }
                                                                                                                      Severity: Major
                                                                                                                      Found in external/qunit/qunit.js and 1 other location - About 2 hrs to fix
                                                                                                                      external/qunit/qunit.js on lines 6112..6116

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

                                                                                                                      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 (k1 === -d || k1 !== d && v1[k1Offset - 1] < v1[k1Offset + 1]) {
                                                                                                                                            x1 = v1[k1Offset + 1];
                                                                                                                                        } else {
                                                                                                                                            x1 = v1[k1Offset - 1] + 1;
                                                                                                                                        }
                                                                                                                      Severity: Major
                                                                                                                      Found in external/qunit/qunit.js and 1 other location - About 2 hrs to fix
                                                                                                                      external/qunit/qunit.js on lines 6149..6153

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

                                                                                                                      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 _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
                                                                                                                                args[_key - 1] = arguments[_key];
                                                                                                                            }
                                                                                                                      Severity: Major
                                                                                                                      Found in external/qunit/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                      external/qunit/qunit.js on lines 5497..5499

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

                                                                                                                      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 _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {
                                                                                                                                        args[_key - 5] = arguments[_key];
                                                                                                                                    }
                                                                                                                      Severity: Major
                                                                                                                      Found in external/qunit/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                      external/qunit/qunit.js on lines 4208..4210

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

                                                                                                                      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

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

                                                                                                                                        } else if (expectedType === "object") {
                                                                                                                                            result = actual instanceof expected.constructor && actual.name === expected.name && actual.message === expected.message;
                                                                                                                      
                                                                                                                                            // Log the string form of the Error object
                                                                                                                                            expected = errorString(expected);
                                                                                                                      Severity: Major
                                                                                                                      Found in external/qunit/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                      external/qunit/qunit.js on lines 4093..4110

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

                                                                                                                      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

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

                                                                                                                                        } else if (expectedType === "object") {
                                                                                                                                            result = actual instanceof expected.constructor && actual.name === expected.name && actual.message === expected.message;
                                                                                                                      
                                                                                                                                            // Log the string form of the Error object
                                                                                                                                            expected = errorString(expected);
                                                                                                                      Severity: Major
                                                                                                                      Found in external/qunit/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                      external/qunit/qunit.js on lines 4003..4013

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

                                                                                                                      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

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

                                                                                                                                pushFailure.apply(undefined, [error.message, error.stacktrace || error.fileName + ":" + error.lineNumber].concat(args));
                                                                                                                      Severity: Minor
                                                                                                                      Found in external/qunit/qunit.js and 1 other location - About 50 mins to fix
                                                                                                                      external/qunit/qunit.js on lines 4219..4219

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

                                                                                                                      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

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

                                                                                                                                    pushFailure.apply(undefined, [error.message, error.stacktrace || error.fileName + ":" + error.lineNumber].concat(args));
                                                                                                                      Severity: Minor
                                                                                                                      Found in external/qunit/qunit.js and 1 other location - About 50 mins to fix
                                                                                                                      external/qunit/qunit.js on lines 4216..4216

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

                                                                                                                      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 (text1.length > text2.length) {
                                                                                                                                    text1A = hm[0];
                                                                                                                                    text1B = hm[1];
                                                                                                                                    text2A = hm[2];
                                                                                                                                    text2B = hm[3];
                                                                                                                      Severity: Minor
                                                                                                                      Found in external/qunit/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                      external/qunit/qunit.js on lines 5978..5983

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

                                                                                                                      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

                                                                                                                                } else {
                                                                                                                                    text2A = hm[0];
                                                                                                                                    text2B = hm[1];
                                                                                                                                    text1A = hm[2];
                                                                                                                                    text1B = hm[3];
                                                                                                                      Severity: Minor
                                                                                                                      Found in external/qunit/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                      external/qunit/qunit.js on lines 5973..5978

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

                                                                                                                      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

                                                                                                                                    currentTest.assert.pushResult({
                                                                                                                                        result: result,
                                                                                                                      
                                                                                                                                        // undefined if it didn't throw
                                                                                                                                        actual: actual && errorString(actual),
                                                                                                                      Severity: Minor
                                                                                                                      Found in external/qunit/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                      external/qunit/qunit.js on lines 4112..4119

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

                                                                                                                      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

                                                                                                                                        currentTest.assert.pushResult({
                                                                                                                                            result: result,
                                                                                                                      
                                                                                                                                            // leave rejection value of undefined as-is
                                                                                                                                            actual: actual && errorString(actual),
                                                                                                                      Severity: Minor
                                                                                                                      Found in external/qunit/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                      external/qunit/qunit.js on lines 4016..4023

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

                                                                                                                      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