MCPcopy Index your code
hub / github.com/conventionalcommit/commitlint / hookCreate

Function hookCreate

internal/cmd/hook.go:23–29  ·  view source on GitHub ↗

hookCreate is the callback function for create hook command

(hooksPath string, isReplace bool)

Source from the content-addressed store, hash-verified

21
22// hookCreate is the callback function for create hook command
23func hookCreate(hooksPath string, isReplace bool) error {
24 if hooksPath == "" {
25 hooksPath = filepath.Join(".", defaultHooksPath)
26 }
27 hooksPath = filepath.Clean(hooksPath)
28 return createHooks(hooksPath, isReplace)
29}
30
31func initHooks(confPath, hookFlag string, isGlobal, isReplace bool) (string, error) {
32 hookDir, err := getHookDir(hookFlag, isGlobal)

Callers 1

newHookCmdFunction · 0.85

Calls 1

createHooksFunction · 0.85

Tested by

no test coverage detected