This is a channel focused on ScanCode support and not as noisy as the main discuss channel
there have been quite a few changes since 3.2.1rc2:
https://github.com/nexB/scancode-toolkit/compare/v3.2.1rc2...develop
like over 1000 commits
Showing 25,888 changed files with 281,590 additions and 385,844 deletions.
@balakrishna-mukundaraj May I suggest that you review the changes in one plugin such as:
https://github.com/nexB/scancode-toolkit/blob/develop/src/formattedcode/output_json.py
and
https://github.com/nexB/scancode-toolkit/blob/v3.2.1rc2/src/formattedcode/output_json.py
@balakrishna-mukundaraj that said the key change seems to be
@output_impl
class JsonPrettyOutput(OutputPlugin):
options = [
CommandLineOption(('--json-pp', 'output_json_pp',),
type=FileOptionType(mode=mode, lazy=True),
metavar='FILE',
help='Write scan output as pretty-printed JSON to FILE.',
help_group=OUTPUT_GROUP,
sort_order=10),
]
which becomes now:
@output_impl
class JsonPrettyOutput(OutputPlugin):
options = [
PluggableCommandLineOption(('--json-pp', 'output_json_pp',),
type=FileOptionType(mode='w', encoding='utf-8', lazy=True),
metavar='FILE',
help='Write scan output as pretty-printed JSON to FILE.',
help_group=OUTPUT_GROUP,
sort_order=10),
]
@guddutopper yes and no.
So the --package option will detect the packages and report dependencies (say in a pom.xml). So you will get the list in this way, at elast the list of direct dependencies.
It will not (yet) resolve nor fetch the dependencies tree to analyze them.
They would have to be in the scanned dir to be analyzed.
They would likely need to be extracted first with extractcode too, at least for now.
scancode --package -n4
and no -cl yet?
@Thomshan try this:scancode --license --license-text --license-text-diagnostics --json-pp jaxen.json jaxen-1.1.3.jar-extract/org/jaxen/dom/NamespaceNode.class
the results:
"start_line": 134,
"end_line": 134,
"matched_rule": {
"identifier": "proprietary-license_276.RULE",
"license_expression": "proprietary-license",
"licenses": [
"proprietary-license"
],
....
"matcher": "2-aho",
"rule_length": 4,
"matched_length": 4,
"match_coverage": 100.0,
"rule_relevance": 100
},
"matched_text": "may not be modified"
and ...
$ strings jaxen-1.1.3.jar-extract/org/jaxen/dom/NamespaceNode.class | grep -A2 -B2 "may not be modified"
org/jaxen/dom/NamespaceNode
org/w3c/dom/DOMException
"Namespace node may not be modified
org.w3c.dom.Node
java/lang/Class
The thing is that 1. class files can contain copyright and licenses in literals and texts. 2. scancode does collect these strings in binaries