jhipster / jhipster/prettier-java
Wrap long javadoc lines where possible
- Vorherrschende Sprache
- Java
- Sterne
- 1.2k
- Forks
- 120
- Ø Merge
- 1 T. 11 Std.
- Gemergte PRs (30 T.)
- 31
Beschreibung
**Prettier-Java 2.6.0**
```sh
# Options (if any):
--print-width 120
```
**Input:**
```java
/**
* Build Service for Git. Primary goal is to allow for lazy initialization of the Git object and keeping it open for later usage.
* This Service should not be considered a published API, and may change or be removed in future versions.
*/
```
**Output:**
```java
/**
* Build Service for Git. Primary goal is to allow for lazy initialization of the Git object and keeping it open for later usage.
* This Service should not be considered a published API, and may change or be removed in future versions.
*/
```
**Expected behavior:**
```java
/**
* Build Service for Git. Primary goal is to allow for lazy initialization of the Git object and keeping it open for
* later usage. This Service should not be considered a published API, and may change or be removed in future versions.
*/
```
beware of word breaking though, this for example shouldn't try to wrap even though it's too long. Note: I'm not certain if this would try to reformat now, and it isn't javadoc, but maybe this issue applies to all comments and I just haven't noticed.
```
// https://github.com/diffplug/spotless/blob/224f8f96df3ad42cac81064a0461e6d4ee91dcaf/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/GitRatchetGradle.java#L35
```
Beitragsleitfaden
Rechercherichtung
Reproduziere das Beispiel mit Prettier-Java 2.6.0 und --print-width 120 und untersuche anschließend den Einstiegspunkt für die Kommentark formatierung sowie die vorhandenen Tests. Die Arbeit ist abgeschlossen, wenn berechtigter Javadoc-Text bei der konfigurierten Breite umgebrochen wird, ohne Wörter zu trennen, während lange URLs wie die im Kommentar von GitRatchetGradle.java referenzierte URL intakt bleiben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100