fix(doctor): improve messaging for detection-only hook managers (bd-par1)
When bd doctor detects hook managers we can't fully check (pre-commit,
overcommit, yorkie, simple-git-hooks), it now shows an informational
message instead of a warning:
✓ pre-commit detected (cannot verify bd integration)
└─ Ensure your hook config calls 'bd hooks run <hook>'
Previously it incorrectly warned that these managers were "not calling bd"
when we simply couldn't verify their config.
Changes:
- Add DetectionOnly field to HookIntegrationStatus
- Set DetectionOnly=true for unsupported managers in CheckExternalHookManagerIntegration
- Update CheckGitHooks and CheckSyncBranchHookCompatibility to show
informational message for detection-only managers
- Add test coverage for DetectionOnly behavior
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -79,6 +79,7 @@ type HookIntegrationStatus struct {
|
||||
HooksWithoutBd []string // Hooks configured but without bd integration
|
||||
HooksNotInConfig []string // Recommended hooks not in config at all
|
||||
Configured bool // Whether any bd integration was found
|
||||
DetectionOnly bool // True if we detected the manager but can't verify its config
|
||||
}
|
||||
|
||||
// bdHookPattern matches the recommended bd hooks run pattern with word boundaries
|
||||
@@ -330,10 +331,11 @@ func CheckExternalHookManagerIntegration(path string) *HookIntegrationStatus {
|
||||
}
|
||||
}
|
||||
|
||||
// Return basic status for unsupported managers
|
||||
// Return basic status for unsupported managers (detection only, can't verify config)
|
||||
return &HookIntegrationStatus{
|
||||
Manager: ManagerNames(managers),
|
||||
Configured: false,
|
||||
Manager: ManagerNames(managers),
|
||||
Configured: false,
|
||||
DetectionOnly: true,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user