Contributing

Thank you for your interest in contributing to dbtective! We’re excited to have you join our detective squad. 🕵️

Getting Started

Prerequisites

  • Rust (latest stable version)
  • Git
  • prek Rust-based fast pre-commit runner
  • just (optional, all relevant commands are shown in the justfile).
  • For running documentation locally:

Setting up your development environment

Fork the repository

Fork the repository on GitHub.

Clone your fork

Clone your fork locally:

git clone https://github.com/your-username/dbtective.git
cd dbtective

Set up the upstream remote

git remote add upstream https://github.com/feliblo/dbtective.git

Install dependencies and build

cargo build

Run the application

Use the commands shown in the justfile or install just and run:

just run
just run-release

Development Workflow

Create an Issue

Before starting work, please:

  • Check if an issue already exists for your idea
  • Create a new issue describing the feature, bug, or improvement
  • Wait for discussion and approval before starting significant work

Branch Strategy

Create a feature branch from main:

git checkout main
git pull upstream main
git checkout -b feature/your-feature-name

Use descriptive branch names:

  • feature/add-yaml-parsing
  • fix/logging-timestamp-format
  • docs/update-installation-guide

Development Guidelines

Code Style

  • Install prek on the repository using prek install to enable pre-commit checks.
  • Follow Rust conventions and use cargo fmt to format code
  • Run cargo clippy to catch common mistakes
  • Write clear, self-documenting code with meaningful variable names
  • Add comments for complex logic

Testing

  • Write unit tests in the corresponding file.
  • Write integration tests in the test folder.
  • Ensure all tests pass: cargo test
  • Add integration tests where appropriate

Commit Guidelines

Please use commitizen or use the same style to write informative commit messages using traditional format.

Pull Request Process

Update your branch with the latest main:

git rebase -i origin/main

Run the full test suite using the commands shown in the justfile or install just and run:

just test
just lint
just fmt

Create a Pull Request, wait for Code Review, and then Merge!

Documentation

To update documentation please refer to the /docs/content folder and apply markdown changes. Use the commands shown in the justfile or install just and run:

just docs

Code of Conduct

This project follows the Rust Code of Conduct. Please be respectful and inclusive in all interactions.

Getting Help

  • Questions? Open a discussion on GitHub
  • Bugs? Create an issue with a minimal reproduction case
  • Ideas? Start with an issue to discuss the approach

Recognition

Contributors will be recognized in:

  • Release notes for significant contributions

Happy detecting! 🕵️‍♀️🔍

Thank you for helping make dbtective better for everyone!