aboutcode-org / aboutcode-org/scancode-toolkit

Invalid hardcoded paths for data files in cache LicenseIndex

Abierto
#3,044 0 comentarios 0 reacciones 0 asignados Ver en GitHub
bug installation and packaging license scan must have Priority: high
Lenguaje dominante
Python
Estrellas
2.6k
Forks
791
Merge medio
1 d 12 h
PR fusionados (30 d)
5

Descripción

```
>>> from licensedcode.cache import *
>>> idx=get_index()
>>> rule = idx.rules_by_rid[1200]
>>> rule
Rule(identifier='agpl-3.0_371.RULE', license_expression='agpl-3.0', minimum_coverage=80, is_continuous=False, relevance=100, has_stored_relevance=True, length=6)
>>> rule.data_file
'/home/runner/work/scancode-toolkit/scancode-toolkit/src/licensedcode/data/rules/agpl-3.0_371.yml'
>>>
```

Here `'/home/runner/work/scancode-toolkit/scancode-toolkit/src/licensedcode/data/rules/agpl-3.0_371.yml' ` is the absolute path if the data files as they existed on some obscure CI runner that was used to create the index... the paths should be relative and "portable" on another machine!

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.