A path or pattern is written with every \\ doubled, which String.raw avoids

tx0/ts:doubled-backslashes-in-stringallwarningstyle/conventionsdepth faststyle

What it finds

Paths and patterns with backslashes need each one doubled in a normal string, which makes them hard to read and easy to get wrong. String.raw keeps them as written.

Reported are string literals with two or more escaped backslashes and no other escapes.

From the rule's source, doubled_backslashes_in_string.rs.

Example from the rule's tests
export const path = "C:\\Users\\app\\config";tx0 reports: these doubled backslashes read betterexport const plain = "C:/Users/app";
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 all tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/ts:doubled-backslashes-in-string" = "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:doubled-backslashes-in-string] reason="..."

tx0 explain tx0/ts:doubled-backslashes-in-string shows the same in the terminal. Found a false positive? Report it.