Skip to content

Latest commit

 

History

History
34 lines (29 loc) · 1.01 KB

File metadata and controls

34 lines (29 loc) · 1.01 KB

AppSettingsGen — Project Conventions

Project Structure

  • src/AppSettingsGen/ — Source generator (netstandard2.0, Roslyn incremental generator)
  • tests/AppSettingsGen.Tests/ — xUnit tests using Roslyn test infrastructure

Coding Style

  • C# 12, nullable enabled
  • PascalCase for public members, _camelCase for private fields
  • Use init properties for generated settings classes
  • Source generator must target netstandard2.0 (Roslyn requirement)
  • No reflection — AOT compatible

Commit Format

  • feat: new feature
  • fix: bug fix
  • test: adding/updating tests
  • docs: documentation
  • refactor: code improvement
  • chore: project setup, CI, tooling

Test Patterns

  • Use CSharpGeneratorDriver for source generator tests
  • Test JSON → generated C# output
  • Verify compilation succeeds with generated code
  • Test edge cases: empty JSON, nested objects, arrays, type inference

Build & Test Commands

dotnet build
dotnet test
dotnet build --no-incremental -warnaserror
dotnet format