Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#437 0 bình luận 1 reaction 1 người được giao Xem trên GitHub

@nedtwigg đang làm issue này rồi.

Từ ngày 26/1/2023.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

bug

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.

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:

Ngôn ngữ chính
Java
Star
5.7k
Fork
560
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
43

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của diffplug/spotless

Tất cả issue của diffplug/spotless

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.