Skip to content

ScanOss ignores line range of snippet choices #12058

Description

@fviernau

Problem

When choosing a snippet with ORIGINAL_FINDING, then all snippet findings which match
purl and sourceLocation will be set to "identified", no matter if startLine or endline is matching.

So, startLine and endLine is not considered at all [1], which is counter intuitive / misleading for users.

Upstream disussion

scanoss/scanoss.java#41

Goal

Figure out if we can enhance the implementation, so that matching on snippet granularity is possible.

[1]

private fun MutableList<Rule>.includeFinding(choice: SnippetChoice) {
this += Rule.builder()
.purl(choice.choice.purl)
.path(choice.given.sourceLocation.path)
.build()
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    scannerAbout the scanner tool

    Fields

    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions