Allow leading `swift-tools-version` in `Package.swift` for Licensing check
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Bắt đầu bằng cách xác định phần kiểm tra license-header của soundness workflow và xem lại cách phần này xử lý .licenseignore và các tệp Package.swift. Xác minh phần kiểm tra bằng các ví dụ Package.swift và Package@swift-5.10.swift có chú thích swift-tools-version, cả khi có và khi không có một dòng trống trước license; hoàn thành có nghĩa là tất cả các dạng được yêu cầu đều vượt qua mà không bỏ qua các manifest.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Swift
- Star
- 115
- Fork
- 57
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 3
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 swiftlang/github-workflows
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
swiftlang/github-workflows#305 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
swiftlang/github-workflows#261 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
swiftlang/github-workflows#258 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
swiftlang/github-workflows#312 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
swiftlang/github-workflows#277 · 1 bình luận ·
Tất cả issue của swiftlang/github-workflows
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
googleapis/google-cloud-swift#1151 ·
-
`--app` focus through the daemon can pick an off-screen window and refuse with `axElementNotFound` Đang mởclawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
code health
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
apple/coreai-models#288 ·
-
task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
vsanthanam/JBird#429 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100