Contributing to Probe
September 10, 2025 ยท View on GitHub
Thank you for considering contributing to Probe! This document provides guidelines and instructions to make the contribution process smooth and effective.
Table of Contents
- Code of Conduct
- Development Setup
- Development Workflow
- Pull Request Process
- Testing Guidelines
- Coding Standards
- Documentation
- Release Process
Code of Conduct
By participating in this project, you are expected to uphold our Code of Conduct. Please report unacceptable behavior to the project maintainers.
Development Setup
Prerequisites
- Rust and Cargo (latest stable version)
- Git
- Make (for using the Makefile commands)
Getting Started
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/probe.git cd probe - Set up the git hooks to ensure code quality:
make install-hooks - Add the original repository as a remote to keep your fork updated:
git remote add upstream https://github.com/probelabs/probe.git
Building the Project
To build the project in debug mode:
make build
To run the application:
make run
For a release build:
make run-release
Development Workflow
-
Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-nameor
git checkout -b fix/issue-you-are-fixing -
Make your changes, following the Coding Standards
-
Run tests to ensure your changes don't break existing functionality:
make test -
Format your code:
make format -
Run the linter:
make lint -
Commit your changes using the Git Commit Message Guidelines
-
Push your branch to your fork:
git push origin feature/your-feature-name -
Create a Pull Request from your fork to the main repository
Pull Request Process
- Ensure your PR includes a clear description of the changes and the purpose
- Link any related issues using keywords like "Fixes #123" or "Resolves #456"
- Make sure all tests pass and there are no linting errors
- Add tests for new functionality
- Update documentation as needed
- Your PR will be reviewed by maintainers who may request changes
- Once approved, your PR will be merged
Testing Guidelines
Probe uses several types of tests to ensure quality:
Running Tests
-
Run all tests:
make test -
Run specific test types:
make test-unit # Unit tests make test-integration # Integration tests make test-property # Property-based tests make test-cli # CLI tests
Writing Tests
- Unit Tests: Place in the same file as the code being tested, using Rust's
#[cfg(test)]module - Integration Tests: Add to the
tests/directory - Property Tests: Use the proptest framework for property-based testing
- CLI Tests: Test the command-line interface functionality
Coding Standards
Rust Style Guidelines
- Follow the Rust API Guidelines
- Use
rustfmtfor consistent formatting (runmake format) - Use
clippyto catch common mistakes (runmake lint)
Git Commit Message Guidelines
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests after the first line
- Consider using emoji prefixes for better readability:
- ๐จ
:art:when improving code structure/format - ๐
:racehorse:when improving performance - ๐
:memo:when writing docs - ๐
:bug:when fixing a bug - โ
:white_check_mark:when adding tests - ๐
:lock:when dealing with security
- ๐จ
Documentation
- Update the README.md if you change functionality
- Document all public API items with rustdoc comments
- Include examples in documentation where appropriate
- Generate documentation with:
make doc
Adding Support for New Languages
If you want to add support for a new programming language:
- Add the appropriate tree-sitter grammar dependency to
Cargo.toml - Implement the language parser in the
src/languagedirectory - Update the language detection logic
- Add tests for the new language support
- Update the documentation to include the new supported language
Release Process
Releases are managed by the project maintainers. The process involves:
- Updating the version in
Cargo.toml - Building release packages for all supported platforms:
VERSION=vX.Y.Z make release - Creating a new GitHub release with release notes
- Publishing the updated package
Questions?
If you have any questions about contributing, feel free to open an issue or contact the project maintainers.
Thank you for contributing to Probe!