Global Metrics

path: .metrics.mi.mi_sei
old: -118.86315566010693
new: -118.87064943179448

path: .metrics.mi.mi_original
old: -74.94751351756237
new: -74.95270780427936

path: .metrics.halstead.length
old: 5003.0
new: 5008.0

path: .metrics.halstead.time
old: 335214.4152738287
new: 336439.4802160213

path: .metrics.halstead.volume
old: 40874.134782215886
new: 40914.9844072231

path: .metrics.halstead.difficulty
old: 147.62048192771084
new: 148.0120481927711

path: .metrics.halstead.N2
old: 1885.0
new: 1890.0

path: .metrics.halstead.purity_ratio
old: 0.4373718104378532
new: 0.4369351373044288

path: .metrics.halstead.level
old: 0.006774127729034891
new: 0.006756206756206756

path: .metrics.halstead.bugs
old: 11.047793285893489
new: 11.074693548994354

path: .metrics.halstead.effort
old: 6033859.474928917
new: 6055910.643888383

Spaces Data

Minimal test - lines (1799, 1802)

path: .spaces[26].metrics.mi.mi_visual_studio
old: 73.18541623363983
new: 73.06127917428

path: .spaces[26].metrics.mi.mi_original
old: 125.14706175952412
new: 124.9347873880188

path: .spaces[26].metrics.mi.mi_sei
old: 104.95001324968196
new: 104.64376606660343

path: .spaces[26].metrics.halstead.N2
old: 10.0
new: 11.0

path: .spaces[26].metrics.halstead.difficulty
old: 5.0
new: 5.5

path: .spaces[26].metrics.halstead.volume
old: 86.03910001730775
new: 89.62406251802891

path: .spaces[26].metrics.halstead.purity_ratio
old: 1.292481250360578
new: 1.240782000346155

path: .spaces[26].metrics.halstead.time
old: 23.899750004807707
new: 27.385130213842167

path: .spaces[26].metrics.halstead.bugs
old: 0.018995729976268395
new: 0.02080033305213527

path: .spaces[26].metrics.halstead.effort
old: 430.19550008653874
new: 492.932343849159

path: .spaces[26].metrics.halstead.level
old: 0.2
new: 0.18181818181818185

path: .spaces[26].metrics.halstead.length
old: 24.0
new: 25.0

Code

  _appendNode: function(tagName, attributes, value = "") {
    const node = this._createNode(tagName, attributes, value);
    this.parsed.push(node);
  },

Minimal test - lines (1770, 1786)

path: .spaces[25].metrics.mi.mi_visual_studio
old: 55.427860197937584
new: 55.38071296402705

path: .spaces[25].metrics.mi.mi_original
old: 94.78164093847326
new: 94.70101916848624

path: .spaces[25].metrics.mi.mi_sei
old: 61.447430794858846
new: 61.33111816711089

path: .spaces[25].metrics.halstead.length
old: 64.0
new: 65.0

path: .spaces[25].metrics.halstead.time
old: 198.1969608283243
new: 209.3455398749176

path: .spaces[25].metrics.halstead.difficulty
old: 12.5
new: 13.0

path: .spaces[25].metrics.halstead.bugs
old: 0.07782606560367689
new: 0.08071784472030841

path: .spaces[25].metrics.halstead.level
old: 0.08
new: 0.07692307692307693

path: .spaces[25].metrics.halstead.volume
old: 285.403623592787
new: 289.86305521142435

path: .spaces[25].metrics.halstead.purity_ratio
old: 1.1891796189065709
new: 1.1708845478464698

path: .spaces[25].metrics.halstead.N2
old: 25.0
new: 26.0

path: .spaces[25].metrics.halstead.effort
old: 3567.545294909838
new: 3768.219717748517

Code

  _createNode: function(tagName, attributes, value = "") {
    const node = this.doc.createElementNS(HTML_NS, tagName);
    const attrs = Object.getOwnPropertyNames(attributes);

    for (const attr of attrs) {
      if (attributes[attr]) {
        node.setAttribute(attr, attributes[attr]);
      }
    }

    if (value) {
      const textNode = this.doc.createTextNode(value);
      node.appendChild(textNode);
    }

    return node;
  },

Minimal test - lines (1490, 1556)

path: .spaces[18].metrics.mi.mi_sei
old: 51.67873843100081
new: 51.637631400957005

path: .spaces[18].metrics.mi.mi_visual_studio
old: 38.56246455812534
new: 38.545801855215366

path: .spaces[18].metrics.mi.mi_original
old: 65.94181439439433
new: 65.91332117241828

path: .spaces[18].metrics.halstead.purity_ratio
old: 0.6461131024015933
new: 0.6425824297108742

path: .spaces[18].metrics.halstead.time
old: 1176.1463974689625
new: 1201.6830748333628

path: .spaces[18].metrics.halstead.N2
old: 62.0
new: 63.0

path: .spaces[18].metrics.halstead.effort
old: 21170.63515444132
new: 21630.29534700053

path: .spaces[18].metrics.halstead.bugs
old: 0.25509464219549827
new: 0.25877384465063874

path: .spaces[18].metrics.halstead.length
old: 182.0
new: 183.0

path: .spaces[18].metrics.halstead.level
old: 0.042183622828784115
new: 0.04151404151404151

path: .spaces[18].metrics.halstead.difficulty
old: 23.705882352941178
new: 24.08823529411765

path: .spaces[18].metrics.halstead.volume
old: 893.0540884007504
new: 897.9609789963589

Code

  _appendColor: function(color, options = {}) {
    const colorObj = new colorUtils.CssColor(color, this.cssColor4);

    if (this._isValidColor(colorObj)) {
      const container = this._createNode("span", {
        "data-color": color,
      });

      if (options.colorSwatchClass) {
        let attributes = {
          class: options.colorSwatchClass,
          style: "background-color:" + color,
        };

        // Color swatches next to values trigger the color editor everywhere aside from
        // the Computed panel where values are read-only.
        if (!options.colorSwatchClass.startsWith("computed-")) {
          attributes = { ...attributes, tabindex: "0", role: "button" };
        }

        // The swatch is a  instead of a 

Minimal test - lines (617, 623)

path: .spaces[5].metrics.mi.mi_visual_studio
old: 66.73237182222883
new: 66.64159088165668

path: .spaces[5].metrics.mi.mi_sei
old: 89.03029770730805
new: 88.80634035347026

path: .spaces[5].metrics.mi.mi_original
old: 114.1123558160113
new: 113.95712040763294

path: .spaces[5].metrics.halstead.length
old: 33.0
new: 34.0

path: .spaces[5].metrics.halstead.N2
old: 13.0
new: 14.0

path: .spaces[5].metrics.halstead.difficulty
old: 6.5
new: 7.0

path: .spaces[5].metrics.halstead.bugs
old: 0.02912365327941172
new: 0.031213726865123102

path: .spaces[5].metrics.halstead.effort
old: 816.677630781356
new: 906.1504714497098

path: .spaces[5].metrics.halstead.level
old: 0.15384615384615383
new: 0.14285714285714285

path: .spaces[5].metrics.halstead.purity_ratio
old: 1.19099905784262
new: 1.155969673788425

path: .spaces[5].metrics.halstead.volume
old: 125.64271242790092
new: 129.45006734995854

path: .spaces[5].metrics.halstead.time
old: 45.37097948785311
new: 50.34169285831721

Code

  _parse: function(text, options = {}) {
    text = text.trim();
    this.parsed.length = 0;

    const tokenStream = getCSSLexer(text);
    return this._doParse(text, options, tokenStream, false);
  },

Minimal test - lines (124, 148)

path: .spaces[1].metrics.mi.mi_visual_studio
old: 49.239886542202825
new: 49.21285582491062

path: .spaces[1].metrics.mi.mi_original
old: 84.20020598716683
new: 84.15398346059716

path: .spaces[1].metrics.mi.mi_sei
old: 72.25400710836958
new: 72.18732209851014

path: .spaces[1].metrics.halstead.level
old: 0.06808510638297872
new: 0.06666666666666667

path: .spaces[1].metrics.halstead.time
old: 429.5679631301165
new: 442.6247401249528

path: .spaces[1].metrics.halstead.difficulty
old: 14.6875
new: 15.0

path: .spaces[1].metrics.halstead.effort
old: 7732.223336342096
new: 7967.24532224915

path: .spaces[1].metrics.halstead.volume
old: 526.4492484318023
new: 531.1496881499434

path: .spaces[1].metrics.halstead.bugs
old: 0.1303411869885041
new: 0.1329691436671446

path: .spaces[1].metrics.halstead.length
old: 112.0
new: 113.0

path: .spaces[1].metrics.halstead.purity_ratio
old: 0.8680292941863718
new: 0.8603476190165809

path: .spaces[1].metrics.halstead.N2
old: 47.0
new: 48.0

Code

  parseCssProperty: function(name, value, options = {}) {
    options = this._mergeOptions(options);

    options.expectCubicBezier = this.supportsType(name, "timing-function");
    options.expectDisplay = name === "display";
    options.expectFilter =
      name === "filter" ||
      (BACKDROP_FILTER_ENABLED && name === "backdrop-filter");
    options.expectShape = name === "clip-path" || name === "shape-outside";
    options.expectFont = name === "font-family";
    options.supportsColor =
      this.supportsType(name, "color") ||
      this.supportsType(name, "gradient") ||
      (name.startsWith("--") && colorUtils.isValidCSSColor(value));

    // The filter property is special in that we want to show the
    // swatch even if the value is invalid, because this way the user
    // can easily use the editor to fix it.
    if (options.expectFilter || this._cssPropertySupportsValue(name, value)) {
      return this._parse(value, options);
    }
    this._appendTextNode(value);

    return this._toDOM();
  },