-
Notifications
You must be signed in to change notification settings - Fork 0
Contributing
grave0x edited this page Jul 19, 2026
·
1 revision
git clone https://github.com/your-org/rapiscm
cd rapiscm
cargo build --release
cargo test
cargo clippy
cargo fmt-
cargo clippy— must pass with-D warnings(no warnings allowed) -
cargo fmt— must be run before diff -
cargo test— all 30+ unit tests must pass
GitHub Actions (.github/workflows/ci.yml) enforces:
-
cargo checkcompiles -
cargo fmt --checkpasses -
cargo clippy -- -D warningspasses -
cargo testpasses -
cargo check --features browsercompiles
- Edition 2024
- Errors:
anyhow/thiserror, propagate with.context()or.map_err() - CLI:
clapderive macros - HTTP:
reqwestwith configurable timeouts - Minimise external deps — prefer stdlib or manual impls (e.g. manual ANSI codes, std time, AtomicU64 IDs)
- Types: PascalCase (
ScanConfig,ResponseResult) - Functions/modules: snake_case (
run_checks,save_report) - Constants/statics: SCREAMING_SNAKE_CASE
-
mod.rsfor module roots with public re-exports - One concern per file, one file per module
-
lib.rsfor public crate API (re-exports only) -
main.rsfor binary entry point (Tokio runtime, dispatch, CLI parsing)
- Unit tests in
#[cfg(test)] mod testsblocks within each source file - Integration tests in
tests/directory - Test with real HTTP servers where possible (
wiremockfor mock servers,tempfilefor temp dirs) - Keep tests deterministic — no network-dependent tests in unit tests
- Create a feature branch from
main - Make changes with atomic commits
- Run
cargo clippy && cargo fmt && cargo test - Push and open a PR
- CI must pass
- Request review
- Create a new file in
src/check/(e.g.mycheck.rs) - Implement a public function returning
Vec<Check> - Register it in
src/check/mod.rs:- In
run_checks()for synchronous checks - In
run_async_checks()for async checks
- In
- Add tests in the same file
- Run
cargo test && cargo clippy
- Create a new file in
src/discover/(e.g.mysource.rs) - Implement a public async function
- Add source reference to
DiscoverConfigif it needs config - Wire it into
discover::mod.rs - Add tests
- Create a new file in
src/report/(e.g.html.rs) - Implement formatter function
- Add format variant to
OutputFormatenum - Add dispatch in
report::mod.rs - Add CLI parser in
config.rs - Update clap arg in
cli.rs
- Keep
AGENTS.mdup to date with project layout and conventions - Keep
docs/*.mdaccurate with CLI flags and features - Update
README.mdwhen adding major features - Rustdoc for public API in
lib.rsand key modules
- Update version in
Cargo.toml - Update
docs/roadmap.mdwith completed milestones - Run full test suite
- Tag release
- Build binaries
- Publish to crates.io (future)
Powered by rapiscm