Skip to content

Initial implementation of VcpkgDetector and VcpkgComponent#52

Merged
grvillic merged 16 commits into
microsoft:mainfrom
ras0219-msft:dev/roschuma/vcpkg
Mar 31, 2022
Merged

Initial implementation of VcpkgDetector and VcpkgComponent#52
grvillic merged 16 commits into
microsoft:mainfrom
ras0219-msft:dev/roschuma/vcpkg

Conversation

@ras0219-msft
Copy link
Copy Markdown
Contributor

@ras0219-msft ras0219-msft commented Jan 24, 2022

This PR contains an initial implementation of detecting SPDX files produced by vcpkg. This depends upon experimental features that are not yet released in the vcpkg tool. (microsoft/vcpkg-tool#296)

New Detector Checklist

  • I have gone through the docs for creating a new detector here
  • My new detector implements IDefaultOffComponentDetector
  • I have created a PR to the verification repo with components that my new detector can find
  • (If necessary) I have updated the Feature Overview table in the README

@ras0219-msft ras0219-msft requested a review from a team as a code owner January 24, 2022 19:14
@JamieMagee JamieMagee added type:feature Feature (new functionality) detector:vcpkg The VCPKG detector labels Jan 25, 2022
@ras0219-msft
Copy link
Copy Markdown
Contributor Author

+@grvillic for review

@JamieMagee JamieMagee requested review from grvillic and removed request for RushabhBhansali February 1, 2022 23:27
@JamieMagee JamieMagee marked this pull request as draft February 3, 2022 19:06
@JamieMagee JamieMagee self-requested a review February 3, 2022 19:06
@JamieMagee
Copy link
Copy Markdown
Member

Moving this to draft for now. There's still an open question about a generic SPDX detector.

@JamieMagee JamieMagee marked this pull request as ready for review February 23, 2022 19:05
Comment thread src/Microsoft.ComponentDetection.Detectors/vcpkg/VcpkgComponentDetector.cs Outdated
…tDetector.cs

Co-authored-by: Greg Villicana <58237075+grvillic@users.noreply.github.com>
Comment thread src/Microsoft.ComponentDetection.Detectors/vcpkg/VcpkgComponentDetector.cs Outdated
@ras0219-msft ras0219-msft requested a review from grvillic March 22, 2022 22:23
Copy link
Copy Markdown
Collaborator

@grvillic grvillic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

@grvillic grvillic self-requested a review March 22, 2022 22:49
Comment thread src/Microsoft.ComponentDetection.Detectors/vcpkg/Contracts/Annotation.cs Outdated
@grvillic grvillic self-requested a review March 22, 2022 22:54

namespace Microsoft.ComponentDetection.Contracts.TypedComponent
{
public class VcpkgComponent : TypedComponent
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add tests for this new detector? See other detector test samples in Microsoft.ComponentDetection.Detectors.Tests.

Copy link
Copy Markdown
Collaborator

@grvillic grvillic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add tests validating the new detector.

@ras0219-msft ras0219-msft requested a review from grvillic March 30, 2022 23:24
Comment thread src/Microsoft.ComponentDetection.Detectors/vcpkg/VcpkgComponentDetector.cs Outdated
…tDetector.cs

Co-authored-by: Greg Villicana <58237075+grvillic@users.noreply.github.com>
@grvillic grvillic merged commit a990db1 into microsoft:main Mar 31, 2022
@github-actions
Copy link
Copy Markdown

👋 Hi! It looks like you modified some files in the Detectors folder.
You may need to bump the detector versions if any of the following scenarios apply:

  • The detector detects more or fewer components than before
  • The detector generates different parent/child graph relationships than before
  • The detector generates different devDependencies values than before

If none of the above scenarios apply, feel free to ignore this comment 🙂

JamieMagee added a commit that referenced this pull request Apr 4, 2022
JamieMagee added a commit that referenced this pull request Apr 4, 2022
var components = detectedComponents.ToList();

Assert.AreEqual(2, components.Count());
{
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need these curly brackets here. you will can just set the variable below without initializing it (without var)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

detector:vcpkg The VCPKG detector type:feature Feature (new functionality)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants