Skip to content

Instantly share code, notes, and snippets.

@buzztaiki
Last active May 22, 2023 15:53
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save buzztaiki/b781c24a55b3b88b4d2bfcf7b666ca9a to your computer and use it in GitHub Desktop.
Save buzztaiki/b781c24a55b3b88b4d2bfcf7b666ca9a to your computer and use it in GitHub Desktop.
SPDX-License-Identifierの使い方

SPDX-License-Identifierの使い方

ファイルに一行書くだけでライセンスの宣言ができるやつ。これを使わいなとファイルヘッダにも何行も書く必要があって大変。

SPDX は Software Package Data Exchange の略で、Linux Fundation 傘下の SPDXプロジェクトが定めてる SBOM の規格らしい。SPDX は広範な規格だけど、そのなかに SPDX-ID っていう「ライセンスを簡単に書けるよ」ってやつがあって、それが SPDX-License-Identifier。ということ。多分。

こんな感じで使えばよい:

# SPDX-License-Identifier: MIT

コピーライトも付けるときは:

# SPDX-FileCopyrightText: 2022 Taiki Sugawara <buzz.taiki@gmail.com>
# SPDX-License-Identifier: MIT

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment