-
-
Notifications
You must be signed in to change notification settings - Fork 602
How To: Add a post scan plugin
John M. Horan edited this page Oct 8, 2019
·
11 revisions
Some post-scan plugins are installed when ScanCode itself is installed, e.g., the License Policy plugin, whose code is located here:
https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/plugin_license_policy.py
These plugins do not require any additional installation steps and can be used as soon as ScanCode is up and running.
ScanCode is also designed to use post-scan plugins that must be installed separately from the installation of ScanCode. The code for this sort of plugin is located here:
https://github.com/nexB/scancode-toolkit/tree/develop/plugins
This wiki page will focus on manually-installed post-scan plugins.
To illustrate the creation of a simple post-scan plugin, we'll create a hypothetical plugin named Hello ScanCode
.
- In the
/scancode-toolkit/plugins/
directory, add a folder with a relevant name, e.g.,hello-scancode
. - Inside the
hello-scancode
folder, add an__init__.py
file. This file can be empty, and is used to indicate that the folder should be treated as a Python package directory.- x
- x
[More to come.]
See http://nexb.com for more.