We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d043997 commit 9d75c9cCopy full SHA for 9d75c9c
hook/hook.go
@@ -9,6 +9,11 @@ import (
9
// CommitMsgHook represent commit-msg hook file name
10
const CommitMsgHook = "commit-msg"
11
12
+const hookFile = `#!/bin/sh
13
+
14
+commitlint lint --message $1
15
+`
16
17
// WriteToFile util func to write commit-msg hook to given file
18
func WriteToFile(hookDir string) (retErr error) {
19
hookFilePath := filepath.Join(hookDir, filepath.Clean(CommitMsgHook))
@@ -28,7 +33,6 @@ func WriteToFile(hookDir string) (retErr error) {
28
33
}
29
34
}()
30
35
31
- commitHook := commitMsgHook()
32
- _, err = file.WriteString(commitHook)
36
+ _, err = file.WriteString(hookFile)
37
return err
38
hook/hook.qtpl
hook/hook.qtpl.go
0 commit comments