Skip to content

Conversation

@JamieMagee
Copy link
Member

@JamieMagee JamieMagee commented Nov 19, 2025

This PR includes 3 classes of changes:

  • Removing #nullable enable directives from file
  • Removing #nullable disable directives from enums
    • Enums cannot be null
  • Removing #nullable disable directives from telemetry records
    • This was the first small code change

Copilot AI review requested due to automatic review settings November 19, 2025 16:55
@JamieMagee JamieMagee requested a review from a team as a code owner November 19, 2025 16:55
@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 57.95455% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.2%. Comparing base (3b0671c) to head (48fdb69).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
.../Telemetry/Records/BcdeExecutionTelemetryRecord.cs 0.0% 6 Missing ⚠️
...ords/LinuxContainerDetectorImageDetectionFailed.cs 0.0% 4 Missing ⚠️
.../DockerServiceImageExistsLocallyTelemetryRecord.cs 0.0% 3 Missing ⚠️
...mmon/Telemetry/Records/GoReplaceTelemetryRecord.cs 0.0% 3 Missing ⚠️
...ry/Records/LinuxContainerDetectorMissingVersion.cs 0.0% 3 Missing ⚠️
...metry/Records/NuGetProjectAssetsTelemetryRecord.cs 0.0% 3 Missing ⚠️
...mmon/Telemetry/Records/RustGraphTelemetryRecord.cs 25.0% 3 Missing ⚠️
...Common/Telemetry/Records/GoGraphTelemetryRecord.cs 50.0% 2 Missing ⚠️
...ry/Records/LinuxContainerDetectorLayerAwareness.cs 33.3% 2 Missing ⚠️
...ry/Records/PypiMaxRetriesReachedTelemetryRecord.cs 0.0% 2 Missing ⚠️
... and 6 more
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1543   +/-   ##
=====================================
  Coverage   90.2%   90.2%           
=====================================
  Files        423     423           
  Lines      35452   35452           
  Branches    2207    2207           
=====================================
+ Hits       31996   31997    +1     
  Misses      3001    3001           
+ Partials     455     454    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot finished reviewing on behalf of JamieMagee November 19, 2025 16:58
Copy link

Copilot AI left a 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 removes redundant nullable directives now that nullable reference types are enabled project-wide via Directory.Build.props. The changes improve code consistency and reduce unnecessary boilerplate.

  • Removes #nullable enable directives from files where the project-level setting makes them redundant
  • Removes #nullable disable directives from enum types that don't require nullable context
  • Removes #nullable disable directives from telemetry record classes and adds appropriate nullable annotations (?) to string and array properties

Reviewed Changes

Copilot reviewed 50 out of 50 changed files in this pull request and generated no comments.

Show a summary per file
File Description
YarnBerryLockfileEntry.cs Removed redundant #nullable enable
UvSource.cs, UvPackage.cs, UvLockComponentDetector.cs, UvLock.cs, UvDependency.cs Removed redundant #nullable enable from UV detector files
PackageLockV3Package.cs, PackageLockV3.cs, PackageLockV2Package.cs, PackageLockV2Dependency.cs, PackageLockV2.cs, PackageLockV1Dependency.cs, PackageLockV1.cs Removed redundant #nullable enable from NPM contract files
DotNetComponentDetector.cs Removed redundant #nullable enable
ComponentType.cs, ProcessingResultCode.cs, DetectorClass.cs, DependencyScope.cs Removed unnecessary #nullable disable from enum files
RustGraphTelemetryRecord.cs, RustDetectionTelemetryRecord.cs, RustCrateDetectorTelemetryRecord.cs Removed #nullable disable and added nullable annotations to string properties
PypiRetryTelemetryRecord.cs, PypiMaxRetriesReachedTelemetryRecord.cs, PypiFailureTelemetryRecord.cs Removed #nullable disable and added nullable annotations to string/array properties
PipReportTypeTelemetryRecord.cs, PipReportSkipTelemetryRecord.cs, PipReportFailureTelemetryRecord.cs Removed #nullable disable and added nullable annotations to string properties
NuGetProjectAssetsTelemetryRecord.cs Removed #nullable disable and added nullable annotations to string properties
LoadComponentDetectorsTelemetryRecord.cs Removed #nullable disable and added nullable annotation to string property
LinuxScannerTelemetryRecord.cs, LinuxScannerSyftTelemetryRecord.cs Removed #nullable disable and added nullable annotations to string properties
LinuxContainerDetector*.cs Removed #nullable disable and added nullable annotations to string/array properties across multiple Linux container detector telemetry files
InvalidParseVersionTelemetryRecord.cs Removed #nullable disable and added nullable annotations to string properties
GoReplaceTelemetryRecord.cs, GoGraphTelemetryRecord.cs Removed #nullable disable and added nullable annotations to string properties
FailedParsingFileRecord.cs Removed #nullable disable and added nullable annotations to string properties
DockerService*.cs Removed #nullable disable and added nullable annotations to string properties across multiple Docker service telemetry files
DetectorExecutionTelemetryRecord.cs Removed #nullable disable and added nullable annotations to string properties
DetectedComponentScopeRecord.cs Removed #nullable disable (no other changes as properties already correct)
DependencyGraphTranslationRecord.cs Removed #nullable disable and added nullable annotation to string property
CommandLineInvocationTelemetryRecord.cs Removed #nullable disable and added nullable annotations to string properties
BcdeExecutionTelemetryRecord.cs Removed #nullable disable and added nullable annotations to string properties

@JamieMagee JamieMagee merged commit 07d23ff into main Nov 19, 2025
33 of 34 checks passed
@JamieMagee JamieMagee deleted the users/jamagee/nullability-update branch November 19, 2025 17:05
@github-actions
Copy link

👋 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 🙂

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants