Skip to content

Commit 9d75c9c

Browse files
refactor: remove hook template
1 parent d043997 commit 9d75c9c

File tree

3 files changed

+6
-45
lines changed

3 files changed

+6
-45
lines changed

hook/hook.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ import (
99
// CommitMsgHook represent commit-msg hook file name
1010
const CommitMsgHook = "commit-msg"
1111

12+
const hookFile = `#!/bin/sh
13+
14+
commitlint lint --message $1
15+
`
16+
1217
// WriteToFile util func to write commit-msg hook to given file
1318
func WriteToFile(hookDir string) (retErr error) {
1419
hookFilePath := filepath.Join(hookDir, filepath.Clean(CommitMsgHook))
@@ -28,7 +33,6 @@ func WriteToFile(hookDir string) (retErr error) {
2833
}
2934
}()
3035

31-
commitHook := commitMsgHook()
32-
_, err = file.WriteString(commitHook)
36+
_, err = file.WriteString(hookFile)
3337
return err
3438
}

hook/hook.qtpl

Lines changed: 0 additions & 7 deletions
This file was deleted.

hook/hook.qtpl.go

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)