Thanks for your interest in contributing. This document explains how to get set up, run tests, and submit changes.
- Rust 1.70 or later
git clone https://github.com/russellwtaylor/sf-docs
cd sf-docs
# Build
cargo build
# Run tests
cargo test
# Check formatting
cargo fmt --all -- --check
# Lint
cargo clippy -- -D warningsTo try the CLI against a local Salesforce project:
cargo run -- generate --source-dir /path/to/sf-project/force-app/main/default/classes --verbose-
Open an issue (optional but helpful for larger changes)
Use Bug report or Feature request so we can align on the approach. -
Branch from
main
Use a short, descriptive branch name (e.g.fix/cache-edge-case,feat/flow-docs). -
Make your changes
Keep the scope focused. Follow existing style: runcargo fmtand fix anycargo clippywarnings. -
Run the test suite
Ensurecargo testandcargo clippy -- -D warningspass locally. -
Open a pull request
Target themainbranch and fill in the PR template. CI will run build, test, format check, and Clippy; all must pass before merge.
- Errors: Use
anyhowin application code; add context with.context("...")at each?. - Regex: Compile once via
std::sync::OnceLock<Regex>in a helper; never compile inside a hot loop. - Tests: Unit tests live in the same file under
#[cfg(test)] mod tests. Usetempfile::TempDirfor filesystem tests.
Module overview:
| Module | Role |
|---|---|
src/main.rs |
Entry point, pipeline orchestration |
src/cli.rs |
CLI definitions (clap) |
src/parser.rs, src/trigger_parser.rs |
Structural parsing (regex-based) |
src/gemini.rs, src/openai_compat.rs |
AI provider clients |
src/renderer.rs, src/html_renderer.rs |
Output generation |
src/types.rs |
Shared data structures |
To add a new metadata type (e.g. another file kind): implement FileScanner in scanner.rs, add a parser and prompt module, extend types.rs, and wire it up in main.rs.
Open a GitHub Discussion for questions or ideas that aren’t bugs or concrete feature requests.