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

Method BodyBlankLines

test/helpers_test.go:48–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46}
47
48func (m *mockCommit) BodyBlankLines() int {
49 if m.body == "" {
50 return 0
51 }
52 idx := strings.IndexByte(m.message, '\n')
53 if idx < 0 {
54 return 0
55 }
56 rest := m.message[idx+1:]
57 if strings.HasPrefix(rest, "\n") || strings.HasPrefix(rest, "\r\n") {
58 return 1
59 }
60 return 0
61}
62
63func (m *mockCommit) FooterBlankLines() int {
64 if m.footer == "" {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected