Contributing¶
Contributions are welcome. Please open an issue or pull request on GitHub.
Development Setup¶
- Clone the repository
- Ensure .NET 10 SDK is installed (
global.jsonpins the version) - Open
LayeredCraft.OptimizedEnums.slnxin your IDE
Running Tests¶
# Runtime tests
dotnet test --project tests/LayeredCraft.OptimizedEnums.Tests/LayeredCraft.OptimizedEnums.Tests.csproj
# Generator snapshot tests
dotnet test --project tests/LayeredCraft.OptimizedEnums.Generator.Tests/LayeredCraft.OptimizedEnums.Generator.Tests.csproj
Running Benchmarks¶
Snapshot Tests¶
The generator tests use Verify.SourceGenerators for snapshot testing. If you change generated output, update the snapshots:
Or delete the relevant .verified.cs file and let the test re-create it.
Building the Package Locally¶
This increments a local counter and publishes to /usr/local/share/nuget/local/.
Code Style¶
- Follow existing patterns in the codebase
- Generator code uses C# latest features (
fieldkeyword,extension()blocks, pattern matching) - Runtime code targets
netstandard2.0— avoid APIs not available there
License¶
By contributing, you agree that your contributions will be licensed under the MIT license.