Skip to content

Remove Null forgiving operator #73

@alex1ozr

Description

@alex1ozr

Description

Remove all instances of the null-forgiving operator (!) from the codebase and address the underlying nullability concerns properly. The null-forgiving operator suppresses compiler warnings but doesn't provide runtime safety, potentially hiding null reference issues.

Approach:

  • Identify all usages of the ! operator throughout the project
  • Replace with proper null checks, guard clauses, or nullable reference type handling
  • Refactor code to make nullability explicit and handled safely
  • Use appropriate patterns: null-coalescing (??), null-conditional (?.), .Required() or explicit validation
  • Find any possible way to restrict usage of the ! operator via Roslyn analyzers

Expected outcome:
A codebase with explicit null handling, improved runtime safety, and enforced nullability discipline through static analysis.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions