jhipster / jhipster/prettier-java
Wrap long javadoc lines where possible
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 1.2k
- Fork
- 120
- Merge medio
- 1g 11h
- PR unite (30g)
- 31
Descrizione
Prettier-Java 2.6.0
# Options (if any):
--print-width 120
Input:
/**
* 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:
/**
* 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:
/**
* 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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riproduci l’esempio con Prettier-Java 2.6.0 e --print-width 120, quindi ispeziona il punto di ingresso della formattazione dei commenti e i test esistenti. Il lavoro è completo quando il testo Javadoc idoneo va a capo in base alla larghezza configurata senza spezzare le parole, mentre gli URL lunghi, come quello indicato nel commento di GitRatchetGradle.java, rimangono intatti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100