aboutcode-org / aboutcode-org/scancode-toolkit

Invalid hardcoded paths for data files in cache LicenseIndex

Đang mở
#3,044 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug installation and packaging license scan must have Priority: high
Ngôn ngữ chính
Python
Star
2.6k
Fork
791
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
5

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.