Skip to content

Conversation

@martinemde
Copy link
Contributor

rather than checking the git diff ourselves, allow lefthook or other tools to pass the files on the command line if they wish.

Allows users to specify files directly on the command line:

  bin/codeownership validate file1.rb file2.rb

This provides a more flexible alternative to the --diff flag for
validating specific files. When explicit files are provided, they
take precedence over the --diff flag and a warning is displayed.

Changes:
- Updated CLI to accept file arguments after options
- Added warning when both --diff and explicit files are provided
- Added comprehensive specs for file argument behavior
- Updated README with usage examples
Copy link
Contributor

@ashleywillard ashleywillard left a comment

Choose a reason for hiding this comment

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

LGTM

@martinemde martinemde merged commit bb759f6 into main Nov 7, 2025
9 checks passed
@martinemde martinemde deleted the validate-explicit-files branch November 7, 2025 18:14
@github-project-automation github-project-automation bot moved this from Triage to Done in Modularity Nov 7, 2025
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