Problem
The current minDiffLines threshold counts raw line changes, which doesn't always reflect meaningful code changes. A single line changing a critical function signature is worth reviewing, while 20 lines of import reordering isn't.
Proposal
Filter out noise before counting lines:
- Import-only changes
- Whitespace-only changes
- Comment-only changes
This would make the skip threshold more meaningful without needing a full token-based approach (which would require adding dependencies to the hook script).
Context
The hook script must remain dependency-free (Bun built-ins only), so any filtering needs to be implemented with basic string/regex operations.
Problem
The current
minDiffLinesthreshold counts raw line changes, which doesn't always reflect meaningful code changes. A single line changing a critical function signature is worth reviewing, while 20 lines of import reordering isn't.Proposal
Filter out noise before counting lines:
This would make the skip threshold more meaningful without needing a full token-based approach (which would require adding dependencies to the hook script).
Context
The hook script must remain dependency-free (Bun built-ins only), so any filtering needs to be implemented with basic string/regex operations.