Remove `toLines(` and use `toContent("""` instead
- Lingua principale
- Java
- Stelle
- 5.7k
- Fork
- 561
- Merge medio
- 1g 14h
- PR unite (30g)
- 43
Descrizione
It would be really convenient if our tests could use multiline string literals. Then we could remove some of this cuteness
https://github.com/diffplug/spotless/blob/aa78b56544ea55abd4cea673c7aaabb5c3da3fcc/testlib/src/main/java/com/diffplug/spotless/ResourceHarness.java#L184-L186
https://github.com/diffplug/spotless/blob/aa78b56544ea55abd4cea673c7aaabb5c3da3fcc/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/ConfigurationCacheTest.java#L50-L61
Right now we test on two platforms - jdk11 and jdk17. But once #1304 gets figured out, we could run our build on Java 17, up the source level to 17 for tests, and use Gradle toolchain to run tests against jre 11 + 17.
That might be too complicated, and java 11 LTS reaches end of life in 2026 which will be here before we know it anyway. But if you made a PR that
- preserved the existing test matrix
- but always used java 17 as the build jre
- compiled bytecode to java 11 for the jars
- compiled bytecode to java 17 for the tests
That would be welcome and quickly merged!
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con le sezioni indicate di testlib/src/main/java/com/diffplug/spotless/ResourceHarness.java e plugin-gradle/src/test/java/com/diffplug/gradle/spotless/ConfigurationCacheTest.java. Esamina la matrice di test esistente e la discussione relativa a #1304 prima di decidere se sostituire gli utilizzi di toLines o modificare la compilazione dei test Java. Il lavoro è completato quando la matrice attuale viene mantenuta e vengono soddisfatti i requisiti dichiarati per il bytecode Java 11 e Java 17.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- build-system, testing
- Tipo di issue
- Refactoring
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100