Thank you for considering a contribution! This document describes the requirements and workflow for contributing to the DavianSpace Hosting package.
- Dart SDK ≥ 3.0
- Run
dart pub getin the package root before starting
# Get dependencies
dart pub get
# Run the full test suite
dart test
# Check formatting
dart format --output=none --set-exit-if-changed .
# Run the static analyzer (strict mode)
dart analyze
# Generate API documentation (optional)
dart docAll four checks (dependencies, tests, format, analyze) must pass before submitting a pull request.
- All public APIs must include comprehensive dartdoc comments with examples, cross-references, and thread-safety notes where applicable.
- Every new feature or bug fix must be covered by tests in
test/. - No runtime reflection (
dart:mirrors) is allowed — the package is designed for full tree-shaking and AOT compilation. - No external dependencies may be added without prior discussion.
- Follow the existing code style enforced by
analysis_options.yaml(strict-casts, strict-inference, strict-raw-types).
- Use
final classfor concrete types andabstract interface classfor contracts. - Prefix private members with
_. - Use imperative mood in doc comments (e.g. "Creates a host builder" not "This method creates…").
lib/
davianspace_hosting.dart ← barrel export
src/
abstractions/ ← public interfaces & value objects
core/ ← default implementations
lifecycle/ ← lifecycle management
services/ ← hosted-service infrastructure
utils/ ← internal utilities
- Tests live in
test/and follow the same directory structure aslib/src/. - Use descriptive
group()andtest()names. - Prefer
expect/expectLaterover manual assertions. - Mark asynchronous tests with
asyncand useexpectLaterfor futures that should throw.
# Run a specific test file
dart test test/davianspace_hosting_test.dart
# Run tests matching a name pattern
dart test --name "Host lifecycle"- Fork the repository.
- Create a feature branch from
master(git checkout -b feature/my-change). - Make your changes with clear, imperative-mood commit messages.
- Ensure all checks pass locally:
dart format --output=none --set-exit-if-changed . dart analyze dart test
- Update
CHANGELOG.mdunder an## Unreleasedheading. - Open a pull request against
masterwith a clear description.
All contributions are reviewed before merging. Reviewers will check:
- Correctness and test coverage
- Documentation quality
- Consistency with existing patterns
- Performance and resource management
Use the GitHub issue tracker to report bugs or request features. Please include:
- A minimal reproduction case
- Expected vs actual behaviour
- Dart SDK version and platform
By contributing, you agree that your contributions will be licensed under the MIT License.