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

Method FooterBlankLines

test/helpers_test.go:63–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61}
62
63func (m *mockCommit) FooterBlankLines() int {
64 if m.footer == "" {
65 return 0
66 }
67 idx := strings.LastIndex(m.message, m.footer)
68 if idx <= 0 || m.message[idx-1] != '\n' {
69 return 0
70 }
71 prev := idx - 1
72 if prev > 0 && m.message[prev-1] == '\r' {
73 prev--
74 }
75 if prev > 0 && m.message[prev-1] == '\n' {
76 return 1
77 }
78 return 0
79}
80
81func (m *mockCommit) NoteCount() int { return len(m.notes) }
82func (m *mockCommit) NoteAt(i int) lint.Note { return m.notes[i] }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected