Skip to content

Smarter diff filtering for minDiffLines threshold #1

Description

@darrylmorley

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions