Contributing
Thank you for your interest in contributing! This document explains the workflow, conventions, and guidelines for the project.
Getting Started
git clone https://github.com/OleksandrTsvirkun/VoloGen.git
cd VoloGen
dotnet tool restore
dotnet husky install
dotnet build
dotnet test
Branch Strategy
We use a simplified GitFlow model with main as the sole long-lived branch:
main— always deployable, protectedfeature/<scope>-<description>— new functionalityfix/<scope>-<description>— bug fixesdocs/<description>— documentation onlychore/<description>— maintenance tasks
Example
git checkout -b feature/parsable-utf8-overloads
# ... work ...
git commit -m "feat(parsable): add IUtf8SpanParsable support"
git push origin feature/parsable-utf8-overloads
# Open a Pull Request → main
Commit Messages
All commits must follow Conventional Commits. This is enforced by a commit-msg git hook (Husky.NET + CommitLint.NET).
Format
<type>(<scope>): <short description>
[optional body]
[optional footer(s)]
Allowed Types
| Type | When to use |
|---|---|
feat |
A new feature or capability |
fix |
A bug fix |
refactor |
Code change that neither fixes a bug nor adds a feature |
docs |
Documentation only |
test |
Adding or updating tests |
build |
Build system or external dependencies |
ci |
CI configuration |
chore |
Maintenance, tooling, configs |
perf |
Performance improvement |
style |
Formatting, white-space, missing semi-colons |
Allowed Scopes
parsable, formattable, comparable, equality, common, abstractions, ci, readme
Good Examples
feat(parsable): add span-based TryParse generation
fix(equality): handle null in Equals(object)
refactor(common): extract ThrowHelper
docs(readme): update usage section
test(parsable): add providerless overload coverage
build(ci): add GitHub Actions workflow
Bad Examples
updated stuff # no type, no scope, vague
fix: thing # missing scope
FEAT(Parsable): Add thing # type must be lowercase
Adding a New Generator
- Create a new project under
src/VoloGen.<Name>/ - Add a marker attribute in
VoloGen.Abstractions - Implement
IIncrementalGenerator - Add diagnostic descriptors in
VoloGen.Common - Create
tests/VoloGen.<Name>.Tests/with xUnit tests - Add both projects to
VoloGen.slnx - Update the README table
Code Style
- Follow
.editorconfigrules - File-scoped namespaces
_camelCasefor private fields- XML doc on public API
- No
TODOcomments in merged code
Testing
- All generators must have tests for:
- Successful code generation
- Each diagnostic (missing partial, static types, etc.)
- Edge cases (empty types, nested types, generic types)
Run tests:
dotnet test
Pull Requests
- One logical change per PR
- All CI checks must pass
- Squash-merge into
main - PR title follows commit convention:
feat(parsable): add UTF-8 support