Skip to content

Conversation

@martinemde
Copy link
Contributor

this performs a check on changed files passed to the command line, allowing a much faster check during pre-commit hooks.

the recommended usage would be the gv subcommand which will generate and then check only the files passed, ensuring that the codeowners file is correct such that the validation is correct.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds file-specific validation support to speed up the validation process, particularly for pre-commit hooks. Instead of validating the entire project, users can now pass specific files to validate only those files for ownership.

  • Added file arguments to validate and generate-and-validate commands
  • Implemented fast validation mode that checks only specified files against CODEOWNERS
  • Added comprehensive test coverage for the new file validation functionality

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/cli.rs Updated command definitions to accept optional file arguments for validate and generate-and-validate commands
src/runner/api.rs Implemented fast file validation logic and updated existing functions to handle file-specific validation
tests/validate_files_test.rs Added comprehensive test suite covering various file validation scenarios including owned, unowned, mixed files, and absolute paths
Comments suppressed due to low confidence (1)

src/runner/api.rs:1

  • Using unwrap() on to_str() can panic if the path contains invalid UTF-8 sequences. Consider using expect() with a descriptive message or handle the None case gracefully.
use std::collections::HashMap;

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@martinemde martinemde force-pushed the martinemde/receive-files branch from d2a123e to 9ce5923 Compare October 11, 2025 16:21
@martinemde martinemde force-pushed the martinemde/receive-files branch from 9ce5923 to f4e0752 Compare October 11, 2025 16:25
@martinemde martinemde merged commit 9a50149 into main Oct 14, 2025
8 checks passed
@github-project-automation github-project-automation bot moved this from Triage to Done in Modularity Oct 14, 2025
@martinemde martinemde deleted the martinemde/receive-files branch October 14, 2025 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants