|
| 1 | +# Contributing to crategeist |
| 2 | + |
| 3 | +Thanks for wanting to contribute. Here's how to get started. |
| 4 | + |
| 5 | +## Development setup |
| 6 | + |
| 7 | +```sh |
| 8 | +git clone https://github.com/arferreira/crategeist.git |
| 9 | +cd crategeist |
| 10 | +cargo build |
| 11 | +``` |
| 12 | + |
| 13 | +## Running locally |
| 14 | + |
| 15 | +```sh |
| 16 | +# Quick test (no build, no network) |
| 17 | +cargo run -- crategeist --skip-timing --skip-security |
| 18 | + |
| 19 | +# Full run on itself |
| 20 | +cargo run -- crategeist |
| 21 | +``` |
| 22 | + |
| 23 | +## Before submitting a PR |
| 24 | + |
| 25 | +```sh |
| 26 | +cargo fmt --check |
| 27 | +cargo clippy -- -D warnings |
| 28 | +cargo build |
| 29 | +``` |
| 30 | + |
| 31 | +Make sure there are no warnings. |
| 32 | + |
| 33 | +## What to work on |
| 34 | + |
| 35 | +Check the [issues](https://github.com/arferreira/crategeist/issues) for open tasks. If you want to work on something not listed, open an issue first to discuss the approach. |
| 36 | + |
| 37 | +Good first contributions: |
| 38 | +- Improving unused dependency detection accuracy |
| 39 | +- Adding output formats (JSON, markdown) |
| 40 | +- Better timing measurement strategies |
| 41 | +- Documentation improvements |
| 42 | + |
| 43 | +## Guidelines |
| 44 | + |
| 45 | +- Keep it simple. Don't over-engineer. |
| 46 | +- One PR per feature or fix. |
| 47 | +- Write clear commit messages. |
| 48 | +- No async — this is a sequential CLI tool (rayon for parallelism where needed). |
| 49 | +- Stable Rust only, no nightly features. |
| 50 | +- Test your changes by running crategeist on real projects. |
| 51 | + |
| 52 | +## Project structure |
| 53 | + |
| 54 | +``` |
| 55 | +src/ |
| 56 | + main.rs # CLI entry, orchestration |
| 57 | + metadata.rs # cargo_metadata wrapper, workspace support |
| 58 | + analyze/ |
| 59 | + timing.rs # cargo build JSON message parsing |
| 60 | + security.rs # rustsec advisory DB audit |
| 61 | + unused.rs # regex source scanning |
| 62 | + critical_path.rs # petgraph DAG longest-path |
| 63 | + report/ |
| 64 | + terminal.rs # comfy-table + colored output |
| 65 | + html.rs # maud single-file HTML report |
| 66 | +``` |
0 commit comments