microsoft / microsoft/component-detection
Introduce nullable reference types
- Dominant language
- C#
- Stars
- 553
- Forks
- 135
- Avg merge
- 20h 58m
- Merged PRs (30d)
- 6
Description
[Nullable reference types][1] were introduced in C# 8 (.NET Core 3.0) and are enabled by default in new projects created targeting .NET 6. They help to prevent `NullReferenceException`s with 3 main features:
- Improved static flow analysis that determines if a variable may be null before dereferencing it
- Attributes that annotate APIs so that the flow analysis determines null-state
- Variable annotations that developers use to explicitly declare the intended null-state for a variable
We should use the [nullable reference migration guide][2] to plan our migration.
NOTE: Adding nullable reference types is not considered a semver breaking change.
[1]: https://learn.microsoft.com/en-us/dotnet/csharp/nullable-references
[2]: https://learn.microsoft.com/en-us/dotnet/csharp/nullable-migration-strategies
Contributor guide
Research direction
Start by reading the linked nullable reference types documentation and the nullable migration strategies guide. The issue names no files, tests, or entry points, so first identify the project scope and migration plan. Done means the component-detection project has been migrated to nullable reference types according to that plan.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- devtools
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100