aboutcode-org / aboutcode-org/scancode-toolkit

Consider collecting the "License-Filename" tag

Offen
#2,852 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
license scan package-formats
Vorherrschende Sprache
Python
Sterne
2.6k
Forks
791
Ø Merge
1 T. 12 Std.
Gemergte PRs (30 T.)
5

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.