A non-converging file is skipped with a zero exit, so spotlessCheck reports success for a file it did not check
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 28/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java
- Lĩnh vực
- build-system, ci-cd
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Java
- Star
- 5.7k
- Fork
- 562
- Merge trung bình
- 3 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 14
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của diffplug/spotless
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Expose `maxLineLength` on the `googleJavaFormat` step (configurable upstream since gjf 1.37.0)Có thể đã có người làm @xzxiaoshan đã nhận 4 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 28/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 43/100
diffplug/spotless#3147 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của diffplug/spotless
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
geonetwork/core-geonetwork#9592 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] ServerHttpRequest.getURI() throws NumberFormatException when Host contains an explicit portĐang mởcomponent/need-triage type/need-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
apache/rocketmq-dashboard#7361 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
higress-group/himarket#358 ·