cyclonedx-conan icon indicating copy to clipboard operation
cyclonedx-conan copied to clipboard

Possible bug while iterating on dependency

Open arnaudgelas opened this issue 3 years ago • 0 comments

Not really familiar yet with the outcome but the following code in command seems bogus, name & version of the bom dictionary is updated while iterating on dependencies:

for node in ...:
...
            bom['metadata']['component']['name'] = os.path.basename(os.path.dirname(node.path))
            bom['metadata']['component']['bom-ref'] = bom['metadata']['component']['name'] + '@' + bom['metadata']['component']['version']

It would be really helpful to add even the most simple test with expected output for at least 1 dummy conan package with 2 dependencies.

My 2 cts

arnaudgelas avatar Feb 21 '22 20:02 arnaudgelas