Skip to content

refactor render prep, numeric parsing, and sensitive screening#36

Merged
hyle merged 1 commit intomainfrom
refactor-render-options-and-sensitive-screening
Mar 17, 2026
Merged

refactor render prep, numeric parsing, and sensitive screening#36
hyle merged 1 commit intomainfrom
refactor-render-options-and-sensitive-screening

Conversation

@hyle
Copy link
Copy Markdown
Owner

@hyle hyle commented Mar 17, 2026

Summary

Refactor three growing areas of the codebase to keep fuori maintainable without changing its behavior.

Changes

  • Unify numeric option parsing in options.c behind a single size-value parser with configurable minimums
  • Move sensitive filename/content screening out of collect.c into a dedicated sensitive.c / sensitive.h module
  • Split render-plan preparation into smaller helpers so hunk-aware rendering logic is easier to follow and maintain
  • Update the build to compile the new sensitive-screening module
  • Keep existing CLI behavior and regression coverage intact

Why

These changes reduce duplication, clarify ownership boundaries, and make the most complex code paths easier to reason about:

  • option parsing no longer has two near-duplicate integer parsers
  • file collection no longer mixes filesystem walking with secret-detection details
  • render prep no longer concentrates all hunk classification and range-building logic in one large function

Verification

  • Ran make test successfully
  • Manual auditing of some output samples

@hyle hyle self-assigned this Mar 17, 2026
@hyle hyle added the enhancement New feature or request label Mar 17, 2026
@hyle hyle merged commit af6a19b into main Mar 17, 2026
@hyle hyle deleted the refactor-render-options-and-sensitive-screening branch March 18, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant