aboutcode-org / aboutcode-org/scancode-toolkit

Consider collecting the "License-Filename" tag

Ouverte
#2,852 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
license scan package-formats
Langage dominant
Python
Étoiles
2.6k
Forks
791
Merge moyen
1 j 12 h
PR mergées (30 j)
5

Description

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.