Extending license detection to use licenses external to ScanCode Toolkit
- Mentors
- Philippe Ombredanne, ayansinha, Jonathan Yang
- Organization
- AboutCode
- Technologies
- python
- Topics
- internal tools, command line interfaces
When doing license detection, ScanCode uses the licenses and rules in the ScanCode LicenseDB. The goal of this project is to extend the capabilities of ScanCode license detection to include licenses that are external to LicenseDB, such as proprietary licenses to be kept within an organization.
The two main components of my approach are adding a new command line option and creating license index caches for these external licenses. The new command line option will enable the user to specify the directories of the licenses and rules that they’d like to use.
The second part of the approach is modifying ScanCode toolkit internals to work with this new command line option, and to handle the creation and maintenance of indexes for any new license sets. Most of these changes involve refactoring existing methods to take in the directories specified in the command line input, which are then used in generating a LicenseScanner object so that these new licenses are cached properly.