| Crates.io | codeowners-validation |
| lib.rs | codeowners-validation |
| version | 0.4.10 |
| created_at | 2025-05-09 14:17:12.889783+00 |
| updated_at | 2025-05-23 16:11:43.003488+00 |
| description | A Rust library for validating CODEOWNERS files. |
| homepage | |
| repository | https://github.com/ryan-flan/codeowners-validation |
| max_upload_size | |
| id | 1667075 |
| size | 108,703 |
A high-performance CODEOWNERS validator optimized for large repositories and monorepos. Written in Rust for maximum performance and minimal memory usage.
Optimized for large CODEOWNERS files:
Add to your workflow (.github/workflows/codeowners-validation.yml):
name: CODEOWNERS Validation
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
validate-codeowners:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run CODEOWNERS Validation
uses: ryan-flan/codeowners-validation@latest # Use latest version
with:
checks: |
exists
duplicate_patterns
# Install via cargo
cargo install codeowners-validation
# Run validation
codeowners-validation --path .github/CODEOWNERS
| Input | Description | Default | Required |
|---|---|---|---|
checks |
Comma-separated list of checks to run | all |
No |
path |
Path to CODEOWNERS file | .github/CODEOWNERS |
No |
exists - Validate all referenced files/directories existduplicate_patterns - Find duplicate ownership patternsall - Run all available checks (default)| Output | Description |
|---|---|
result |
Validation result: success or failure |
errors |
Detailed error messages (if any) |
- uses: ryan-flan/codeowners-validation@v0.4.4
- uses: ryan-flan/codeowners-validation@v0.4.4
with:
checks: exists
- uses: ryan-flan/codeowners-validation@v0.4.4
with:
path: docs/CODEOWNERS
checks: exists,duplicate_patterns
# Clone the repository
git clone https://github.com/ryan-flan/codeowners-validation
cd codeowners-validation
# Build release version
cargo build --release
# Run tests
cargo test
# Run benchmarks
cargo bench
The project includes comprehensive benchmarks for large CODEOWNERS files:
# Run all benchmarks
cargo bench
# Run specific benchmark
cargo bench --bench benchmark 10k_rules
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.