Option lists are two-column lists of command-line options and descriptions,
documenting a program’s options. For example:
-c, --copyright
Scan <input> for copyrights.
Sub-Options:
--consolidate
-l, --license
Scan <input> for licenses.
Sub-Options:
--consolidate
--license-scoreINT
--license-text
--license-url-templateTEXT
--license-text-diagnostics
--is-license-text
-p, --package
Scan <input> for packages.
Sub-Options:
--consolidate
-e, --email
Scan <input> for emails.
Sub-Options:
--max-emailINT
-u, --url
Scan <input> for urls.
Sub-Options:
--max-urlINT
-i, --info
Include information such as:
Size,
Type,
Date,
Programming language,
sha1 and md5 hashes,
binary/text/archive/media/source/script flags
Additional options through more CLI options
Sub-Options:
--mark-source
Note
Unlike previous 2.x versions, -c, -l, and -p are not default. If any of combination of these
options are used, ScanCode only performs that specific task, and not the others.
scancode-e only scans for emails, and doesn’t scan for copyright/license/packages/general
information.
Note
These options, i.e. -c, -l, -p, -e, -u, and -i can be used together. As in, instead of
scancode-c-i-p, you can write scancode-cip and it will be the same.
--generated
Classify automatically generated code files with a flag.
--max-email INT
Report only up to INT emails found in a
file. Use 0 for no limit. [Default: 50]
Sub-Option of - --email
--max-url INT
Report only up to INT urls found in a
file. Use 0 for no limit. [Default: 50]
Sub-Option of - --url
--license-score INTEGER
Do not return license matches with scores lower than this score.
A number between 0 and 100. [Default: 0]
Here, a bigger number means a better match, i.e. Setting a higher license score
translates to a higher threshold (with equal or less number of matches).
Sub-Option of - --license
--license-text
Include the matched text for the detected licenses in the output report.
Sub-Option of - --license
Sub-Options:
--license-text-diagnostics
--is-license-text
--license-url-template TEXT
Set the template URL used for the license reference URLs.
The option --max-email is a sub-option of and requires the option --email.
If in the files that are scanned, in individual files, there are a lot of emails (i.e lists) which
are unnecessary and clutter the scan results, --max-email option can be used to report emails
only up to a limit in individual files.
Some important INTEGER values of the --max-emailINTEGER option:
The option --max-url is a sub-option of and requires the option --url.
If in the files that are scanned, in individual files, there are a lot of links to other websites
(i.e url lists) which are unnecessary and clutter the scan results, --max-url option can be
used to report urls only up to a limit in individual files.
Some important INTEGER values of the --max-urlINTEGER option:
The option --license-score is a sub-option of and requires the option --license.
License matching strictness, i.e. How closely matched licenses are detected in a scan, can be
modified by using this --license-score option.
Some important INTEGER values of the --license-scoreINTEGER option:
0 - Default and Lowest Value, All matches are reported.
100 - Highest Value, Only licenses with a much better match are reported
Here, a bigger number means a better match, i.e. Setting a higher license score translates to a
higher threshold for matching licenses (with equal or less number of license matches).
Here’s the license results on setting the integer value to 100, Vs. the default value 0. This is
visualized using ScanCode workbench in the License Info Dashboard.
An example matched text included in the results is as follows:
"matched_text":" This software is provided 'as-is', without any express or impliedwarranty.Innoeventwilltheauthorsbeheldliableforanydamagesarisingfromtheuseofthissoftware.Permissionisgrantedtoanyonetousethissoftwareforanypurpose,includingcommercialapplications,andtoalteritandredistributeitfreely,subjecttothefollowingrestrictions:1.Theoriginofthissoftwaremustnotbemisrepresented;youmustnotclaimthatyouwrotetheoriginalsoftware.Ifyouusethissoftwareinaproduct,anacknowledgmentintheproductdocumentationwouldbeappreciatedbutisnotrequired.2.Alteredsourceversionsmustbeplainlymarkedassuch,andmustnotbemisrepresentedasbeingtheoriginalsoftware.3.Thisnoticemaynotberemovedoralteredfromanysourcedistribution.Jean-loupGaillyMarkAdlerjloup@gzip.orgmadler@alumni.caltech.edu"
The file in which this license was detected: samples/arch/zlib.tar.gz-extract/zlib-1.2.8/zlib.h
Running a scan on the samples directory with --license-text--license-text-diagnostics options,
causes the following difference in the scan result of the file
samples/JGroups/licenses/bouncycastle.txt.
Without Diagnostics:
"matched_text":"License Copyright (c) 2000 - 2006 The Legion Of The Bouncy Castle(http://www.bouncycastle.org)Permissionisherebygranted,freeofcharge,toanypersonobtainingacopyofthissoftwareandassociateddocumentationfiles(the \"Software\"),todealintheSoftwarewithoutrestriction