diffplug / diffplug/spotless

Gradle does not detect java sources for `java-gradle-plugin`

Offen
#437 0 Kommentare 1 Reaktion 1 zugewiesene Person Beansprucht von @nedtwigg Auf GitHub ansehen
bug
Vorherrschende Sprache
Java
Sterne
5.6k
Forks
559
Ø Merge
1 T. 13 Std.
Gemergte PRs (30 T.)
34

Beschreibung

With gradle `4.1` and spotless `3.6.0`, the following worked. With gradle `5.6` and spotless `3.24.1`, it silently fails to format sources.

```gradle
apply plugin: 'java-gradle-plugin'
spotless {
java { ... }
}
```

This is similar to #111 (spotless fails to detect android sources). Just like #111, the workaround is to list the target explicitly: `target 'src/main/java/**/*.java', 'src/test/java/**/*.java'`.

Silently not formatting is a bummer. Would perhaps be good for Spotless to report a warning if a format has been described, but the target turned out to be empty.

Project which reproduces this issue:

- works before this commit, broken after it: https://github.com/diffplug/image-grinder/pull/2/commits/3e73517746e1a1bf899a8b593c21cf71c2a72c8e
- workaround: https://github.com/diffplug/image-grinder/pull/2/commits/8b69781c6ee90a59c6546eaa99ba5065ace38aff

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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