google / google/google-java-format
Formatting overly long lines does not respect `--lines` range restriction
- Lenguaje dominante
- Java
- Estrellas
- 6.2k
- Forks
- 937
- Merge medio
- 6 min
- PR fusionados (30 d)
- 3
Descripción
Let Test.java be:
```
class Test {
void foo() {
// Columns:
// 1 2 3 4 5 6 7 8 9
// ..0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
System.err.println("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
}
}
```
What I did: `$ google-java-format --lines 1:1 Test.java | diff Test.java -`
What I expected to happen: No diff, since line 1 is already correctly formatted.
What actually happens:
```
6c6,7
< System.err.println("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
---
> System.err.println(
> "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
```
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.