-
Notifications
You must be signed in to change notification settings - Fork 114
Introduce C++ SDK component type #1599
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1599 +/- ##
=====================================
Coverage 90.0% 90.0%
=====================================
Files 435 437 +2
Lines 37107 37181 +74
Branches 2299 2306 +7
=====================================
+ Hits 33426 33498 +72
- Misses 3209 3210 +1
- Partials 472 473 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a new CppSdk component type to support C++ SDK version detection in the Component Detection system. The implementation follows established patterns for TypedComponent classes and includes all necessary registrations for JSON serialization.
Key changes:
- Added
CppSdkenum value (20) toComponentTypeenum - Created
CppSdkComponentclass with Name and Version properties, using "generic" PackageURL type with a "cppsdk" qualifier - Registered the new component in
TypedComponentJSON polymorphic serialization andTypedComponentConverterfor Newtonsoft.Json compatibility
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
ComponentType.cs |
Added CppSdk = 20 enum value with [EnumMember] attribute |
CppSdkComponent.cs |
New component class with Name/Version validation, generic PURL with "type=cppsdk" qualifier |
TypedComponent.cs |
Registered CppSdkComponent in [JsonDerivedType] attributes for System.Text.Json polymorphic serialization |
TypedComponentConverter.cs |
Added CppSdk to component type mapping dictionary for Newtonsoft.Json compatibility |
CppSdkComponentTests.cs |
Comprehensive unit tests covering constructor validation, property initialization, and PackageURL format |
test/Microsoft.ComponentDetection.Contracts.Tests/CppSdkComponentTests.cs
Show resolved
Hide resolved
test/Microsoft.ComponentDetection.Contracts.Tests/CppSdkComponentTests.cs
Show resolved
Hide resolved
src/Microsoft.ComponentDetection.Contracts/TypedComponent/CppSdkComponent.cs
Show resolved
Hide resolved
|
👋 Hi! It looks like you modified some files in the
If none of the above scenarios apply, feel free to ignore this comment 🙂 |
Context
We are experimenting with a new component type for C++ SDK version detection.