Repository navigation
Commit 9cecb8a
authored
docs: document
* fix: no-control-regex false negative for \c control letter escapes
The rule detected \x, \u, and raw control characters in regex
patterns but missed \cA-\cZ (and \ca-\cz) control letter escapes,
which also produce control characters in the U+0000-U+001F range.
Fixes #21281
* docs: document \c control letter escapes in no-control-regex
Clarify that \cA-\cZ (and \ca-\cz) control letter escapes are
intentionally allowed by this rule, since they explicitly signal
intent to match a control character, unlike the hex/unicode/raw
forms the rule disallows. Add tests covering this behavior.
Fixes #21281\c control letter escapes in no-control-regex (#21286)1 parent c6cc6c5 commit 9cecb8a
2 files changed
Lines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
49 | 60 | | |
50 | 61 | | |
51 | 62 | | |
| |||
237 | 248 | | |
238 | 249 | | |
239 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
240 | 260 | | |
241 | 261 | | |
0 commit comments