aboutcode-org / aboutcode-org/scancode-toolkit

Consider collecting the "License-Filename" tag

オープン
#2,852 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
license scan package-formats
主要言語
Python
スター
2.6k
フォーク
791
平均マージ
1日 12時間
マージ済み PR(30日)
5

説明

Seen in https://git.sr.ht/~etalab/sill.etalab.gouv.fr/tree/master/item/src/clj/sillweb/config.clj#L3

> ;; Copyright (c) 2019-2022 DINUM, Bastien Guerry
> ;; SPDX-License-Identifier: EPL-2.0
> ;; License-Filename: LICENSES/EPL-2.0.txt

We have one example of such rule https://github.com/nexB/scancode-toolkit/blob/ebb55c341bc6ba644d2be0e531ffbfc2948bca47/src/licensedcode/data/rules/gpl-3.0_115.RULE

There are enough in the wild: https://github.com/search?p=2&q="License-Filename"&type=Code

It likely may need to be a new detector for licenses that would:

1. report these tags with a synthetic new license rule that would have the detected filename as a `referenced_filenames`
2. then use this in the regular process to follow file references

This is often used with an SPDX-License-Identifier tag, so we may also be consider these tow together.
Along the way it could be interesting to consider other structured tag-like conventions used to create structured metadata in source code such as dunder variables in Python javadoc, jsdoc and similar. We deal with these with rules today, but that's not optimal

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

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

評価

この issue はまだ評価されていません。

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

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