3.1 KiB
3.1 KiB
Contributing to Process
First off, thanks for taking the time to contribute! 🎉
Code of Conduct
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
Getting Started
- Fork the repository
- Clone your fork
- Create a new branch for your feature/fix
- Make your changes
- Run the tests
- Submit a pull request
Development Setup
- Install Dart SDK (version >= 3.0.0)
- Clone the repository
- Run
dart pub get
to install dependencies - Run
dart test
to ensure everything is working
Running Tests
# Run all tests
./tool/test.sh
# Run only unit tests
./tool/test.sh --unit
# Run tests with coverage
./tool/test.sh --coverage
# Run tests in watch mode
./tool/test.sh --watch
Code Style
This project follows the official Dart Style Guide. Please ensure your code:
- Uses the standard Dart formatting (
dart format
) - Passes static analysis (
dart analyze
) - Includes documentation comments for public APIs
- Has appropriate test coverage
Pull Request Process
- Update the README.md with details of changes if needed
- Update the CHANGELOG.md following Keep a Changelog
- Update the version number following Semantic Versioning
- Include tests for any new functionality
- Ensure all tests pass
- Update documentation as needed
Writing Tests
- Write unit tests for all new functionality
- Include both success and failure cases
- Test edge cases and error conditions
- Use the provided testing utilities for process faking
- Aim for high test coverage
Example test:
void main() {
group('Process Execution', () {
late Factory factory;
setUp(() {
factory = Factory();
});
test('executes command successfully', () async {
factory.fake({
'test-command': FakeProcessDescription()
..withExitCode(0)
..replaceOutput('Test output'),
});
final result = await factory
.command('test-command')
.run();
expect(result.successful(), isTrue);
expect(result.output(), equals('Test output'));
});
});
}
Documentation
- Document all public APIs
- Include examples in documentation comments
- Keep the README.md up to date
- Add inline comments for complex logic
Reporting Issues
When reporting issues:
- Use the issue template if provided
- Include steps to reproduce
- Include expected vs actual behavior
- Include system information:
- Dart version
- Operating system
- Package version
- Include any relevant error messages or logs
Feature Requests
Feature requests are welcome! Please:
- Check existing issues/PRs to avoid duplicates
- Explain the use case
- Provide examples of how the feature would work
- Consider edge cases and potential issues
Questions?
Feel free to:
- Open an issue for questions
- Ask in discussions
- Reach out to maintainers
License
By contributing, you agree that your contributions will be licensed under the MIT License.