What problem does it solve?
This Skill addresses the common issue of developers using the null-forgiving operator (!) to suppress compiler warnings, which masks underlying problems and can lead to runtime NullReferenceException errors. It enforces best practices for robust null handling.
Core Features & Use Cases
- Proper Warning Resolution: Fixes C# compiler warnings related to nullability by implementing guard clauses, validation, and null checks instead of using the
! operator.
- Methodical Approach: Works on one file and one warning type at a time, ensuring thoroughness and reviewability.
- Test-Driven Fixes: Emphasizes adding or verifying test coverage before making code modifications.
- Use Case: When encountering
CS8602 (Dereference of possibly null reference) or CS8604 (Possible null reference argument) warnings in your C# code, this Skill will guide you through implementing safe null-handling logic.
Quick Start
Use the warning-fixer skill to fix CS8602 warnings in the file SessionManager.cs.