MCPcopy Create free account
hub / github.com/conventionalcommit/commitlint / initHooks

Function initHooks

internal/cmd/hook.go:31–42  ·  view source on GitHub ↗
(confPath, hookFlag string, isGlobal, isReplace bool)

Source from the content-addressed store, hash-verified

29}
30
31func initHooks(confPath, hookFlag string, isGlobal, isReplace bool) (string, error) {
32 hookDir, err := getHookDir(hookFlag, isGlobal)
33 if err != nil {
34 return "", err
35 }
36
37 err = writeHooks(hookDir, isReplace)
38 if err != nil {
39 return "", err
40 }
41 return hookDir, nil
42}
43
44func createHooks(hookBaseDir string, isReplace bool) error {
45 return writeHooks(hookBaseDir, isReplace)

Callers 1

initLintFunction · 0.85

Calls 2

getHookDirFunction · 0.85
writeHooksFunction · 0.85

Tested by

no test coverage detected