Skip to content

feat(hooks): add proofline hooks status subcommand - #77

Open
Mantavya131 wants to merge 1 commit into
prooflinedev:mainfrom
Mantavya131:feat/hooks-status
Open

Mantavya131 wants to merge 1 commit into
prooflinedev:mainfrom
Mantavya131:feat/hooks-status

Conversation

@Mantavya131

Copy link
Copy Markdown

Summary

Adds a proofline hooks status subcommand (with --pre-commit, --pre-push, and --json flags) so developers can inspect their repository's Git hook installation state and active proofline.hook.* git config without manually checking .git/hooks/ or git config.

What's included

  • Reports the resolved hooks directory and whether core.hooksPath is set.
  • Classifies each hook (pre-commit, pre-push) as installed, modified, other, or not_installed.
  • Displays active hook policy (mode, failOn, onIncomplete, timeout) and surfaces invalid git config values cleanly instead of aborting.
  • Supports --json for scripting/CI diagnostics.
  • Adds unit tests in src/hooks.rs covering file state classification and text rendering.

Verification

  • cargo test --lib hooks (9 passed)
  • cargo fmt && cargo clippy --lib --bins -- -D warnings (0 warnings)
  • Manually verified proofline hooks status and proofline hooks status --json

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant