This file provides guidance to AI coding agents when working with code in this repository.
codeowners-rs is a Rust implementation of a CODEOWNERS resolver. It parses CODEOWNERS files and determines ownership of files in a repository, used as both a library and CLI tool.
# Build
cargo build
cargo build --release
# Run all tests
cargo test
# Run a single test by name
cargo test test_name
# Lint
cargo clippy --all-targets --all-features
cargo fmt --all -- --check # check only
cargo fmt --all # apply formatting
# Check compilation without building
cargo checksrc/main.rs— CLI entry point usingclapsrc/lib.rs— library root; exposes the public APIsrc/ownership.rs/src/ownership/— core ownership resolution logic: parses CODEOWNERS patterns and matches them against file pathssrc/config.rs— configuration loadingsrc/runner/— orchestrates file walking and ownership resolutionsrc/cache/— caching layer for resolved ownership resultssrc/cli.rs— CLI command definitions- Integration tests in
src/common_test.rs; fixture data used in tests lives alongside test files