Skip to content

Ensure the --version output is easy to parse #2856

@pombredanne

Description

@pombredanne

Today's output of the --version option requires some work to be parsed:

$ ./scancode --version
ScanCode version 30.1.0
ScanCode Output Format version 2.0.0
SPDX License list version 3.15

we should instead make it valid YAML such that this is easy to read for human and parse for tools:

$ ./scancode --version
ScanCode version: 30.1.0
ScanCode Output Format version: 2.0.0
SPDX License list version: 3.15

This would be enough!

$ python
>>> import saneyaml
>>> a='''ScanCode version: 30.1.0
... ScanCode Output Format version: 2.0.0
... SPDX License list version: 3.15
... '''
>>> saneyaml.load(a)
{'ScanCode version': '30.1.0', 'ScanCode Output Format version': '2.0.0', 'SPDX License list version': '3.15'}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions