Skip to content

feat(hooks): add hk to detected hook managers#657

Open
mvanhorn wants to merge 1 commit intoentireio:mainfrom
mvanhorn:feat/add-hk-hook-manager-detection
Open

feat(hooks): add hk to detected hook managers#657
mvanhorn wants to merge 1 commit intoentireio:mainfrom
mvanhorn:feat/add-hk-hook-manager-detection

Conversation

@mvanhorn
Copy link
Contributor

@mvanhorn mvanhorn commented Mar 8, 2026

Summary

Closes #610

Adds detection for hk as an external hook manager, following the same filesystem-based detection pattern used for Husky, Lefthook, and other existing hook managers.

hk uses .pkl config files with four possible locations:

  • hk.pkl (root)
  • hk.local.pkl (root, local override)
  • .config/hk.pkl (config dir)
  • .config/hk.local.pkl (config dir, local override)

All four variants are checked, and results are deduplicated so hk only appears once in the detected list regardless of how many config files exist.

Changes

  • hook_managers.go - Added hk detection block generating checks for all 4 config file variants
  • hook_managers_test.go - Added 4 tests: basic detection, .config/ dir variant, .local variant, and deduplication across multiple config files

Testing

  • All 4 new tests pass
  • Follows existing test patterns (isolated temp repos with testutil.InitRepo, t.Parallel())
  • Verified deduplication works when multiple hk config files exist simultaneously

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Detect hk (https://hk.jdx.dev) config files during `entire enable`.
hk uses .pkl config files in the repo root or .config/ directory:
hk.pkl, hk.local.pkl, .config/hk.pkl, .config/hk.local.pkl

Closes entireio#610

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mvanhorn mvanhorn requested a review from a team as a code owner March 8, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Add hk to detected hook managers

1 participant