A non-converging file is skipped with a zero exit, so spotlessCheck reports success for a file it did not check
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 28/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- java
- Bereich
- build-system, ci-cd
Rechercherichtung
Start from the 'Skipping ... because it does not converge' message and find where the Gradle check task decides a non-converging file is skipped rather than failed. Reproduce with a markdown file that has a six-space-indented fenced block under a checklist item, using Prettier 3.9.6, then run spotlessMarkdownCheck. Done means a green check implies every target file was checked, through a failOnSkip-style option or a non-zero exit, and the maintainers still need to agree on the design first.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
What happens
For a file the formatter cannot converge on, Spotless prints
Skipping '<path>' because it does not converge. Run {@code spotlessDiagnose} to understand why
and the check task passes — exit 0, BUILD SUCCESSFUL. The file is neither formatted nor reported as a violation,
so a green spotlessCheck is not evidence about that file at all.
Why it matters
In CI the file is silently ungated: the gate reports success while the file may be arbitrarily unformatted. A formatter
or plugin bump can also turn a previously-formatted file non-convergent with no signal — the gate goes from green to
green. It took a review of ours to notice a file was being skipped, and only because the message happened to be read.
Reproduction
Spotless 8.10.4 (Gradle plugin), format("markdown") with Prettier pinned at 3.9.6 — the trigger: the same file
converges under 3.9.10, so a reader on 3.9.10 sees no skip:
-
Add a markdown file whose fenced block is indented six spaces under a checklist item:
- [ ] a task ```bash echo hi ``` -
./gradlew spotlessMarkdownCheck --rerun-tasksprints theSkipping '<path>' because it does not converge.line
above and exits 0.
With Prettier 3.9.10 the same file converges and no skip is printed; with 3.9.6 it does not. So the trigger in this case
is a version difference, but the silent skip is the gap either way — nothing about the message or the exit status
distinguishes "checked and formatted" from "not checked".
What would help
A way to make a skip fail the check — a failOnSkip-style option on the check task, or a non-zero exit when a target
file was not checked. A warning would help a human but not CI; the property worth having is that a green check means
every target file was actually checked.
Related, but a different ask: #1689 reports a convergence failure for ktlint — that the formatter converge on a
construct, not that a skip be visible.
- Vorherrschende Sprache
- Java
- Sterne
- 5.7k
- Forks
- 562
- Ø Merge
- 3 T. 2 Std.
- Gemergte PRs (30 T.)
- 30
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus diffplug/spotless
-
Expose `maxLineLength` on the `googleJavaFormat` step (configurable upstream since gjf 1.37.0)Evtl. vergeben @xzxiaoshan hat das vor 3 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 28/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 43/100
diffplug/spotless#3147 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
diffplug/spotless#3067 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in diffplug/spotless
Ähnliche Issues
-
Bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
protobuf
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
FasterXML/jackson-dataformats-binary#874 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 75/100
-
Add the AI-disclosure footer to README.mdEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
-
Add the AI-disclosure footer to README.mdEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
HexaHexes/infinite-dungeon-spawn-safety#17 ·
Maintainer antworten meist innerhalb von 1 Tag