Contributing¶
Contributions are welcome — bug reports, feature requests, documentation improvements, and pull requests are all appreciated.
Getting started¶
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/<you>/hornet - Create a feature branch:
git checkout -b feat/my-feature - Make your changes
- Run the quality gate:
make quality - Push and open a pull request
Architecture decisions and roadmaps¶
hornet follows Architecture Driven Development (ADD): for architecturally significant changes the order is fixed,
- ADRs live in
docs/adr/asNNNN-title.md. Write one before changing the public API or AST types, the parser's permissive/strict behaviour, the writer's output orWriteOptions, validator diagnostic semantics, the CLI contract, dependencies or feature flags, or the CI and release pipeline. - Roadmaps live in
.github/community/, with their status board inROADMAPS.md. A PR that completes a roadmap task ticks it in the detail doc and updates theROADMAPS.mdrow. - The threat model gets a full pass, and a bumped stamp, once an ADR is implemented.
Small bug fixes, docs changes and adding one more typed option or record type following the existing pattern need tests, not an ADR.
Adding support for a new named.conf statement¶
Follow this checklist in order:
- Add AST types to
src/ast/named_conf.rs - Add a new arm to the
Statementenum - Add a parser in
src/parser/named_conf.rs - Add a writer arm in
src/writer/named_conf.rs - Add validation rules in
src/validator/mod.rs(if applicable) - Add integration tests in
tests/named_conf.rs - Update the named.conf Constructs reference page
Adding support for a new zone file record type¶
Follow this checklist in order:
- Add an
RDatavariant tosrc/ast/zone_file.rs - Add a parser case in
src/parser/zone_file.rs - Add a writer case in
src/writer/zone_file.rs - Add validation rules if applicable
- Add integration tests in
tests/zone_file.rs - Update the Zone Record Types reference page
Code style¶
- Rust edition 2021, MSRV 1.74
- All public items must have
///doc comments - Use
thiserrorfor error types - Use
tracingfor diagnostics (notprintln!oreprintln!in library code) - Prefer early returns over deeply nested
if/else - No
unwrap()in production code — use?or explicit error handling - No magic numbers — define named constants
- All new code must pass
cargo clippy --all-targets --all-features -- -D warnings
Commit messages¶
Follow Conventional Commits:
feat(parser): add support for the 'server' statement
fix(validator): report duplicate zone names as Error not Warning
docs(cli): document --allow-warnings flag for check command
test(zone_file): add round-trip tests for TLSA records
Pull request guidelines¶
- One concern per PR — keep PRs focused on a single feature or fix
- Tests required — new parsers and writers must have integration tests
- Documentation required — update the relevant reference pages
- Green CI required —
make qualitymust pass
Reporting bugs¶
Open an issue at https://github.com/firestoned/hornet/issues with:
- The hornet version (
hornet --version) - The BIND9 config or zone file fragment that causes the issue (minimised if possible)
- What you expected to happen
- What actually happened
License¶
By contributing to Hornet you agree that your contributions will be licensed under the Apache License, Version 2.0, consistent with the rest of the project.