Thank you for your interest in contributing to SourceGen! 🎉
- .NET 10 SDK
- A code editor (VS Code, Visual Studio, or Rider recommended)
# Clone the repository
git clone https://github.com/AndyElessar/SourceGen.git
cd SourceGen
# Restore dependencies
dotnet restore
# Build
dotnet build
# Run tests
dotnet test- Check if the issue already exists in GitHub Issues
- If not, create a new issue with:
- A clear and descriptive title
- Steps to reproduce the issue
- Expected vs actual behavior
- Your environment (OS, .NET version)
- Sample code if applicable
- Check existing issues for similar requests
- Open a new issue with the
enhancementlabel - Describe the feature and its use case
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes following our coding guidelines
- Add or update tests as needed
- Ensure all tests pass (
dotnet test) - Commit your changes (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow .NET naming conventions
- Use C# 14 extensions members where applicable
- Use file-scoped namespaces
- Use nullable reference types (
#nullable enable) - Add XML documentation for public APIs
- Implement
IIncrementalGenerator - Use static lambdas to prevent captures
- Use value equality data models (
readonly record structorsealed record class) - Use
PolyType.Roslyn.ImmutableEquatableArray<T>,PolyType.Roslyn.ImmutableEquatableDictionary<TKey, TValue>,PolyType.Roslyn.ImmutableEquatableSet<T>for collections in data models - Always check
CancellationToken - Read Andrew Lock's great blogs!
- Write tests using
TUnit - Use
Verifyfor snapshot testing - Test both positive and negative cases
- Check TUnit Best Practices
Please be respectful and constructive in all interactions. We welcome contributors of all skill levels.
Feel free to open an issue for any questions about contributing.
Thank you for contributing!