What problem does it solve?
Ensures the repository compiles, all tests pass, and code formatting is correct before commits or pull requests, preventing broken builds, failing tests, and accidental style or migration changes from entering shared branches.
Core Features & Use Cases
- Restore and Build: Run dotnet restore and dotnet build in Release configuration to confirm successful compilation.
- Run Tests: Execute all tests or targeted test projects and individual test filters to ensure zero test failures.
- Format Verification: Verify formatting using dotnet format --verify-no-changes and guide developers to run dotnet format if issues are found.
- Git Status Check: Inspect git status to catch unintended changes to configuration, environment files, migrations, or binaries before committing.
- Use Cases: Run before every git commit, before opening a PR, after merging from main, after adding NuGet packages, or after creating EF Core migrations.
Quick Start
Run the verification sequence: restore and build the solution, run all tests, verify formatting, and check git status before creating a pull request.