A /.../ literal contains a run of spaces

tx0/ts:pattern-space-runstrictwarningstyle

What it finds

/total: (\d+)/: several spaces in a row are hard to count when reading the pattern. A quantifier says how many are meant, as /total: {3}(\d+)/.

Runs of two or more spaces outside character classes in regular expression literals are reported. The fix replaces the run with one space and a count, which matches the same text, and is safe; a run followed by a quantifier is left alone, since the quantifier applies to its last space only.

From the rule's source, pattern_space_run.rs.

Example from the rule's tests
const a = /total:   (\d+)/;tx0 reports: this pattern has 3 spaces in a rowconst b = /a {3}b/;const c = /[  ]/;
Highlighted lines are the ones tx0 reports, with its message under each; the other lines are left alone.

Turn it on, off or suppress it

The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/ts:pattern-space-run" = "warning"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

// tx0: ignore[tx0/ts:pattern-space-run] reason="..."

tx0 explain tx0/ts:pattern-space-run shows the same in the terminal. Found a false positive? Report it.