aboutcode-org / aboutcode-org/scancode-toolkit
Allow to run scan on list of files with relative or absolute paths
- 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ả
## Short Description
As a scancode toolkit user I would like to have a possibility to run scan on the list of files.
It would be ideally to support absolute paths.
## Possible Labels
- new feature
- nice to have
- design needed
- easy
## Select Category
- [x] Enhancement
- [ ] Add License/Copyright
- [ ] Scan Feature
- [ ] Packaging
- [ ] Documentation
- [ ] Expand Support
- [ ] Other
## **Describe the Update**
Currently tool does not allow me to use absolute paths. I tried to use relative paths and pass a list of files with relative paths but this works only in particular cases when files in the same directory have not common first characters:
`scancode -cl --json out.json --license-text --license-score 100 --license-text-diagnostics lib/custom/custom.c lib/custom/foo.c` - This works well
`scancode -cl --json out.json --license-text --license-score 100 --license-text-diagnostics lib/custom/custom.c lib/custom/custom.h `- This does not work and displays "Error: Invalid value: Invalid inputs: all input paths must share a common single parent directory" even if these files have a common parent directory
but the perfect solution would be passing a complete lists of files using absolute paths:
`scancode -cl --json out.json --license-text --license-score 100 --license-text-diagnostics /home/user/lib/custom/custom.c home/user/lib/custom/custom.h`
## **How This Feature will help you/your organization**
In most cases we need to run scancode toolkit only on the few files and we don't want to scan whole directories. At this moment we run scancode on every single file because we cannot pass the complete list of files which is inefficient. It would help as a lot to run single command for all needed files.
## **Possible Solution/Implementation Details**
It looks like this could be simple to solve because passing list of files seems to be only blocked by checks in `run_scan` function but I am not sure if there would be more work somewhere else.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.