Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the version control provenance mapping algorithm #1195

Open
ghost opened this issue Jan 2, 2019 · 0 comments
Open

Implement the version control provenance mapping algorithm #1195

ghost opened this issue Jan 2, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented Jan 2, 2019

The SDK should have a help method that implements the algorithm described in oasis-tcs/sarif-spec#248, "Version control details not strongly associated result", which introduced the property versionControlDetails.mappedTo of type fileLocation.

Since a result can have more than one location, IMO the input to the algorithm should be a FileLocation rather than a Result . We can either implement it in the FileLocation partial class or as an extension method on FileLocation. Since this functionality isn't core to the notion of fileLocation, it feels more like an extension method to me:

public static VersionControlDetails GetRepositoryForFile(
    this FileLocation fileLocation,
    VersionControlDetails[] versionControlProvenance);

@michaelcfanning FYI

@ghost ghost added the enhancement label Jan 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants