google-java-format icon indicating copy to clipboard operation
google-java-format copied to clipboard

google-java-format does not enforce rules 2.3.1 (inside strings) or 2.3.2

Open novalis opened this issue 8 years ago • 1 comments

https://google.github.io/styleguide/javaguide.html#s2.3.1-whitespace-characters

The 2.3.1 problem is only in the sentence "All other whitespace characters in string and character literals are escaped": google-java-format doesn't replace a literal tab inside a string with \t.

novalis avatar May 31 '17 18:05 novalis

The formatter doesn't try to fix all style errors, only ones what involve whitespace between tokens. Replacing literal whitespace with escapes inside string literals seems feasible but slightly outside its mandate.

cushon avatar Apr 18 '19 23:04 cushon