jhipster / jhipster/prettier-java

Comment Formatting

Offen
#679 2 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
1.2k
Forks
120
Ø Merge
1 T. 14 Std.
Gemergte PRs (30 T.)
27

Beschreibung

**prettier-plugin-java**
_version: 2.6.4_

```sh
# Options (if any):
--print-width 120
```

**Input:**

```java
// some comment some comment some comment some comment some comment some comment some comment some comment some comment some comment some comment some comment some comment
public SomeClass() {}

```

**Output:**

```java
// some comment some comment some comment some comment some comment some comment some comment some comment some comment some comment some comment some comment some comment
public SomeClass() {}

```

**Expected behavior:**
Does Prettier not format comment sections? As I see, it has even issues with formatting the code which is in one line with a comment. Is it right? Or there is some new version with fixed comment formatting?

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Reproduce the report with prettier-plugin-java 2.6.4, the shown Java input, and --print-width 120. Compare the formatter's comment and one-line code behavior with the expected output, then determine whether the unchanged comment is intentional or a formatting bug; done means the behavior is clarified or covered by a verified fix.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
tooling
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.