`MisleadingEscapedSpace` false positive with `CRLF` line separator in sources
- Dominant language
- Java
- Stars
- 7.2k
- Forks
- 820
- Avg merge
- 5h 9m
- Merged PRs (30d)
- 50
Description
Using errorprone `2.39.0`, with the following code:
```
String test = """
test\s
test
""";
```
If the java source file have `LF` line separators nothing is detected, but if the source file contains `CRLF` line separators instead errorprone detect a `MisleadingEscapedSpace` error.
Looks like the detection is working on sources and only checking for `\n`, so it will detect a false positive if sources have `CRLF` endings like so `\s\r\n`.
Not sure of the case where the sources would have `LF` endings, but with explicit `\r\n` in the string/text block. I guess it would also detect an issue in this case but it is probably ok as a simple space could be used in this case.
Contributor guide
Assessment
This issue has not been assessed yet.