-
Notifications
You must be signed in to change notification settings - Fork 113
Remove redundant #nullable enable directives #1543
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 #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. 🚀 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 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 enabledirectives from files where the project-level setting makes them redundant - Removes
#nullable disabledirectives from enum types that don't require nullable context - Removes
#nullable disabledirectives 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 |
|
👋 Hi! It looks like you modified some files in the
If none of the above scenarios apply, feel free to ignore this comment 🙂 |
This PR includes 3 classes of changes:
#nullable enabledirectives from file#nullable disabledirectives from enumsnull#nullable disabledirectives from telemetry records