Skip to content

SpdxDocumentModelMapper: Revisit dependency relationship creation iteration(s)  #11823

Description

@fviernau

The following two iterations which are supposed to determine when to add an edge
slightly differ from one another in the following aspects

Determine linkage type of ID pairs which should be connected

This is done here: 1, and calls following iteration APIs:

Adding the relationships

This is done here: 2, and calls following iteration APIs:

Question

  • Are the two iterations semantically equivalent?
  • If yes, can this be simplified?
    • One idea is to refactor addRelationShip calls to simply be done by an iteration over the map val linkageTypesForDependencyRelationships.

Footnotes

  1. https://github.com/oss-review-toolkit/ort/blob/fb2abcedbd0ed43430814876a98d10acc99aa157/plugins/reporters/spdx/src/main/kotlin/SpdxDocumentModelMapper.kt#L218-L254

  2. https://github.com/oss-review-toolkit/ort/blob/fb2abcedbd0ed43430814876a98d10acc99aa157/plugins/reporters/spdx/src/main/kotlin/SpdxDocumentModelMapper.kt#L86-L126

Metadata

Metadata

Assignees

No one assigned

    Labels

    reporterAbout the reporter tool

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions