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

License complexity issues

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
git, java
Lĩnh vực
build-system, tooling

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện hành vi đã được báo cáo liên quan đến ratcheting, remotes, spotless check và spotlessApply, bao gồm các tệp được sao chép và những thay đổi về giấy phép. So sánh việc tách copyright/license được yêu cầu, hành vi của addenda hoặc ignore, và .spotlessignore với cấu hình và các bài kiểm thử hiện tại; hoàn tất nghĩa là nội dung giấy phép được giữ nguyên hoặc cập nhật một cách có chủ đích mà không làm hỏng các bước kiểm tra định dạng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

This is kind of hard to describe... licensing is broken (or at least hard) as soon as you need to mix licenses or attribution

ratcheting doesn't work will on CI, remotes aren't usually set up properly, not enough information pulled down, running on the same branch that you're comparing to (like main/master). spotless check will fail then when a license doesn't match what you've put in.

So, if you have a file that you've copied (following the rules) from another repo, spotless check will fail, and/or try to overwrite.

If you're changing your license it's "impossible" to retain the header until such time that the file has changed.

If you need to concatenate your license with another (clone and own), that's also difficult.

The rest of spotless check is probably fine, I mean, I want to ensure formatting always. Licensing is where the problem comes in, because it's not the same as a formatting issue. I definitely want it to update, but I need it to not change the terms, or remove other notices.

I suppose for clone/own I can use spotless off:on? but if I've only cloned (say an upcoming patch that I need today, or because guava is bloated...), then I'm going to assume it would still inject my own header.

I feel like what I need is a way to specify copyright, and license separately, as well as a better way to ignore/addendum. Also a way to tell spotless check to ignore licensing (text, not matching) altogether (I still want spotlessApply to update in most cases, but even that I feel like I need something simple).

a .spotlessignore file would help for clone only, espcially since you would want to ignore formatting too.

Thoughts?

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.