Skip to main content

ScanCode

ScanCode

A wrapper for ScanCode.

Configuration

Example

{
"ScanCode": {
"options": {
"commandLine": "--copyright,--license,--info,--strip-root,--timeout,300",
"commandLineNonConfig": null,
"preferFileLicense": false,
"regScannerName": null,
"minVersion": null,
"maxVersion": null,
"configuration": null,
"readFromStorage": true,
"writeToStorage": true
}
}
}

Options

commandLine

STRING_LIST Default

Command line options that modify the result. These are added to the [ScannerDetails] when looking up results from a [ScanStorage].

commandLineNonConfig

STRING_LIST

Command line options that do not modify the result and should therefore not be considered in [configuration], like "--processes". If this does not contain "--processes", it is added with a value of one less than the number of available processors.

preferFileLicense

BOOLEAN Default

A flag to indicate whether the "high-level" per-file license reported by ScanCode starting with version 32 should be used instead of the individual "low-level" per-line license findings. The per-file license may be different from the conjunction of per-line licenses and is supposed to contain fewer false-positives. However, no exact line numbers can be associated to the per-file license anymore. If enabled, the start line of the per-file license finding is set to the minimum of all start lines for per-line findings in that file, the end line is set to the maximum of all end lines for per-line findings in that file, and the score is set to the arithmetic average of the scores of all per-line findings in that file.

regScannerName

STRING

A regular expression to match the scanner name when looking up scan results in the storage.

minVersion

STRING

The minimum version of stored scan results to use.

maxVersion

STRING

The maximum version of stored scan results to use.

configuration

STRING

The configuration to use for the scanner. Only scan results with the same configuration are used when looking up scan results in the storage.

readFromStorage

BOOLEAN Default

Whether to read scan results from the storage.

writeToStorage

BOOLEAN Default

Whether to write scan results to the storage.