aboutcode-org / aboutcode-org/scancode-toolkit

Consider collecting the "License-Filename" tag

Abierto
#2,852 0 comentarios 0 reacciones 0 asignados Ver en GitHub
license scan package-formats
Lenguaje dominante
Python
Estrellas
2.6k
Forks
791
Merge medio
1 d 12 h
PR fusionados (30 d)
5

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.