A regular expression contains an accented letter but is compiled without CANON_EQ, so the same letter written in decomposed form does not match

tx0/java:regex-without-canonical-equivalencestrictwarningreliability/strings-and-regexdepth fastbug

What it finds

é can be one code point or e followed by a combining accent; text from other systems often uses the second form. Without Pattern.CANON_EQ a pattern matches only the form it was written in.

Reported is a pattern given to Pattern.compile with a letter from U+00C0 to U+024F and without the CANON_EQ flag.

From the rule's source, regex_without_canonical_equivalence.rs.

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/java:regex-without-canonical-equivalence" = "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/java:regex-without-canonical-equivalence] reason="..."

tx0 explain tx0/java:regex-without-canonical-equivalence shows the same in the terminal. Found a false positive? Report it.