Allow leading `swift-tools-version` in `Package.swift` for Licensing check
还没有人认领这个 Issue。
评估
调研方向
首先定位 soundness workflow 的许可证头检查,并查看它如何处理 .licenseignore 和 Package.swift 文件。使用包含 swift-tools-version 注释的 Package.swift 和 Package@swift-5.10.swift 示例验证该检查,分别测试许可证前有空行和没有空行的情况;完成的标准是所有要求的形式都能通过,且不会忽略这些 manifest。
由索引模型根据 Issue 内容生成。
描述
By convention the first line of a Package.swift manifest is a comment containing the tools version:
"The version is specified on the first line of the manifest with the comment
// swift-tools-version:and the version for the Swift compiler."
Following this convention causes the license header check of the soundness workflow to fail, even if the tools version is followed by a valid license header.
The approach I have seen taken to work around this, is to add the Package.swift file to the .licenseignore file to allow this test to pass.
Since Package.swift files are almost always present in swiftlang repositories, having license checking automatically work with the documented comment on the first line would allow these files to be more easily checked (or checked at all, instead of ignored).
This should also be allowed in version-specific manifest files such as Package@swift-5.10.swift.
Ideally the check would be able to accept both:
- First line is swift-tools-version comment
- License begins on second line
AND
- First line is swift-tools-version comment
- Second line is an empty newline
- License begins on third line
Allowing the tools version to be separated from the license by an empty newline makes it clear the tools version is separate from the license and makes both more easily readable.
- 主要语言
- Swift
- 星标
- 115
- 派生
- 57
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 3
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
swiftlang/github-workflows 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
swiftlang/github-workflows#305 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
swiftlang/github-workflows#261 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
swiftlang/github-workflows#258 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 68/100
swiftlang/github-workflows#312 ·
-
难度 3/5 1-2 天 新手友好度 58/100
swiftlang/github-workflows#277 · 1 条评论 ·
查看 swiftlang/github-workflows 的全部 Issue
相似的 Issue
-
task
难度 2/5 1-3 小时 新手友好度 70/100
vsanthanam/JBird#429 ·
-
needs-triage
难度 2/5 1-3 小时 新手友好度 75/100
nightscout/Trio#1574 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
pending-maintainer-response pending-triage
难度 2/5 1-3 小时 新手友好度 75/100
-
area:build bug good first issue P2
难度 2/5 1-3 小时 新手友好度 75/100
uttrflow/uttrflow-swift#1412 ·