Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Allow leading `swift-tools-version` in `Package.swift` for Licensing check

オープン
#202 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
swift
領域
ci-cd

調査の方向性

まず、soundness workflow のライセンスヘッダーチェックを見つけ、.licenseignore と Package.swift ファイルをどのように処理しているかを確認します。swift-tools-version コメントを含む Package.swift と Package@swift-5.10.swift の例について、ライセンスの前に空行がある場合とない場合の両方でチェックを検証します。すべての要求された形式がマニフェストを無視せずに通れば完了です。

索引モデルが 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."

-Swift Package Manager Documentation

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時間
マージ済み PR(30日)
3

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

swiftlang/github-workflows のほかの issue

swiftlang/github-workflows の issue をすべて見る

似ている issue

Swift の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。