Update: Report '\08' and '\09' in no-octal-escape (fixes #12080) #12526
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of this pull request? (put an "X" next to item)
[X] Bug fix #12080
This PR fixes two bugs in
no-octal-escape
, both fixes can generate more warnings:\0
when followed by8
or9
, as described in Report '\08' and '\09' in no-octal-escape #12080.At the moment, the rule doesn't check the second and other lines of a multiline string (Online Demo Link)
What changes did you make? (Give an overview)
0(?=[89])
to capture0
as an octal escape sequence.s
flag to fix the problem with multiline strings.Is there anything you'd like reviewers to focus on?