Support Ktlint 2.0

Aperta
#3,156 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
70/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java, kotlin
Ambito
tooling

Direzione di ricerca

Start with the two hardcoded-coordinate locations in lib/src/main/java/com/diffplug/spotless/kotlin/KtLintStep.java (lines 43–44 and 76). Check how the existing KtLint integration resolves its Maven artifact and invokes the CLI, then verify whether KtLint 2.0 also requires package-name adjustments. Done means KtLint 2.0 resolves and works through the supported entry point.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Since 2.0 (currently in alpha) Ktlint uses a new maven coordinate (io.github.ktlint.core), so 2.0 versions can't resolve. This is not workaround-able as the coordinates are hardcoded:

https://github.com/diffplug/spotless/blob/c810e6ba29a481d91a9972f1fe0aa49494a132c0/lib/src/main/java/com/diffplug/spotless/kotlin/KtLintStep.java#L43-L44

https://github.com/diffplug/spotless/blob/c810e6ba29a481d91a9972f1fe0aa49494a132c0/lib/src/main/java/com/diffplug/spotless/kotlin/KtLintStep.java#L76

Additionally, the package name has also changed to io.github.ktlint..., this might also needs an adjustment. I believe the CLI has not changed so if that is used as the only entrypoint, then only the coordinates need updating.

Lingua principale
Java
Stelle
5.7k
Fork
565
Merge medio
3g 7h
PR unite (30g)
13

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di diffplug/spotless

Tutte le issue di diffplug/spotless

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.