aboutcode-org / aboutcode-org/scancode-toolkit

Invalid hardcoded paths for data files in cache LicenseIndex

未关闭
#3,044 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug installation and packaging license scan must have Priority: high
主要语言
Python
星标
2.6k
派生
791
平均合并
1 天 12 小时
30 天内合并 PR
5

描述

```
>>> 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!

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。