MCPcopy Create free account
hub / github.com/JordanCoin/codemap / hookPreEdit

Function hookPreEdit

cmd/hooks.go:650–657  ·  view source on GitHub ↗

hookPreEdit warns before editing hub files (reads JSON from stdin)

(root string)

Source from the content-addressed store, hash-verified

648
649// hookPreEdit warns before editing hub files (reads JSON from stdin)
650func hookPreEdit(root string) error {
651 filePath, err := extractFilePathFromStdin()
652 if err != nil || filePath == "" {
653 return nil // silently skip if no file path
654 }
655
656 return checkFileImporters(root, filePath)
657}
658
659// hookPostEdit shows impact after editing (reads JSON from stdin)
660func hookPostEdit(root string) error {

Callers 1

RunHookFunction · 0.85

Calls 2

extractFilePathFromStdinFunction · 0.85
checkFileImportersFunction · 0.85

Tested by

no test coverage detected