jhipster / jhipster/prettier-java
Continuation Indent
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 120
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 27
Description
**Prettier-Java ^0.8.0**
```sh
# Options (if any):
--print-width 80
```
**Input:**
```java
// code snippet
public class Test {
public void testMethod(final String param1, final String param2) throws Exception {
throw new Exception("blah");
}
}
```
**Output:**
> Note that `throws` and `throw` appear at the same indentation.
```java
// code snippet
public class Test {
public void testMethod(final String param1, final String param2)
throws Exception {
throw new Exception("blah");
}
}
```
**Expected behavior:**
When `throws` is wrapped, it seems like it should be more clearly separated from code inside the method.
One option is to use one additional indentation any time a line is wrapped, but open to alternatives:
```
public class Test {
public void testMethod(final String param1, final String param2)
throws Exception {
throw new Exception("blah");
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.