Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

License complexity issues

未关闭
#2,060 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
git, java

调研方向

首先复现围绕 ratcheting、remotes、spotless check 和 spotlessApply 报告的行为,包括复制的文件和许可证变更。将所请求的 copyright/license 分离、addenda 或 ignore 行为以及 .spotlessignore 与当前配置和测试进行比较;完成的标准是有意保留或更新许可证文本,且不破坏格式检查。

由索引模型根据 Issue 内容生成。

描述

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?

主要语言
Java
星标
5.7k
派生
560
平均合并
1 天 13 小时
30 天内合并 PR
43

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

diffplug/spotless 的其他 Issue

查看 diffplug/spotless 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。