google / google/google-java-format
Consistent formatting of multivariable try-with-resource blocks.
オープン
- 主要言語
- Java
- スター
- 6.2k
- フォーク
- 937
- 平均マージ
- 6分
- マージ済み PR(30日)
- 3
説明
The current formatting of try-with-resource blocks that manage multiple variables is strange, as it results in inconsistent alignment and doesn't match how multiline parameters or code blocks are formatted.
Current output:
```java
try (var input = Files.newInputStream(Path.of("./input"));
var output = Files.newOutputStream(Path.of("./output")); ) {
output.write(input.read());
} catch (IOException _) {
}
```
How I think it should be formatted:
```java
try (
var input = Files.newInputStream(Path.of("./input"));
var output = Files.newOutputStream(Path.of("./output"));
) {
output.write(input.read());
} catch (IOException _) {
}
```
コントリビューションガイド
評価
この issue はまだ評価されていません。