-
Notifications
You must be signed in to change notification settings - Fork 5
Labels
buildAffects Builds or External dependenciesAffects Builds or External dependencieschoreOther changes that do not modify src or test filesOther changes that do not modify src or test filesciChanges to CI scriptsChanges to CI scriptsdocsDocumentation only changesDocumentation only changes
Milestone
Description
Enable C# nullable reference types and treat warnings as errors across the solution to improve null-safety and catch issues earlier in development.
Why
- Nullable enables C#'s null-reference static analysis:
- Warns about potential null reference issues
- Forces explicit handling of nullable types
- Makes null safety visible in your code
- TreatWarningsAsErrors turns warnings into build failures:
- Code won't compile until null issues (and other warnings) are fixed
- Catches problems during development rather than production
Proposal
Add these settings to a Directory.Build.props file placed next to the solution (.sln) so they apply to all projects:
Suggested Directory.Build.props
enable
true
Suggested rollout checklist
- Add Directory.Build.props (near solution file) with above settings
- Run solution build to collect warnings
- Fix null-related and other warnings or suppress justified ones
- Create PR with changes and request reviews
- Optionally: add a CI job to ensure builds fail on warnings
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
buildAffects Builds or External dependenciesAffects Builds or External dependencieschoreOther changes that do not modify src or test filesOther changes that do not modify src or test filesciChanges to CI scriptsChanges to CI scriptsdocsDocumentation only changesDocumentation only changes
Type
Projects
Status
No status