-
-
Notifications
You must be signed in to change notification settings - Fork 600
How To: Run a scan
ScanCode results are provided as:
- JSON file (default)
- html (static html)
The basic usage is:
./scancode [OPTIONS] <OUTPUT FORMAT OPTION(s)> <input>
Note: On Windows use scancode instead of ./scancode
The <input>
file or directory is what will be scanned for origin clues. The results will be saved to the <output_file> in <OUTPUT FORMAT OPTION(s)>
.
The output file format is set by using the following output formats: (The default output format is JSON)
output formats:
--json FILE Write scan output as compact JSON to FILE.
--json-pp FILE Write scan output as pretty-printed JSON to FILE.
--json-lines FILE Write scan output as JSON Lines to FILE.
--csv FILE Write scan output as CSV to FILE.
--html FILE Write scan output as HTML to FILE.
--custom-output FILE Write scan output to FILE formatted with the custom
Jinja template file.
--custom-template FILE Use this Jinja template FILE as a custom template.
--spdx-rdf FILE Write scan output as SPDX RDF to FILE.
--spdx-tv FILE Write scan output as SPDX Tag/Value to FILE.
--html-app FILE (DEPRECATED: use the ScanCode Workbench app instead
) Write scan output as a mini HTML application to
FILE.
The following example scans will show you how to run a scan with each of the result formats. For the scans, we will use the samples
directory provided with the ScanCode Toolkit.
Scan the samples
directory and save the scan to a JSON file:
./scancode --json samples samples.json
Scan the samples
directory for licenses and copyrights and save the scan results to an HTML file. When the scan is done, open samples.html
in your web browser.
./scancode --html samples samples.html
See http://nexb.com for more.