[#7] Check empty line after commit's header

Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
This commit is contained in:
Ekaterina Lebedeva 2024-06-26 13:05:48 +03:00
parent b8aea16a20
commit a9d9c0d077

View file

@ -77,6 +77,13 @@ func main() {
return nil return nil
} }
// Check empty line after header.
if 1 < len(lines) && lines[1] != "" {
fail = true
fmt.Printf("Error: second line must be empty '%s' [%s]\n", lines[1], id)
return nil
}
// Check commit sign-off. // Check commit sign-off.
if !rxSignOff.MatchString(lines[len(lines)-1]) { if !rxSignOff.MatchString(lines[len(lines)-1]) {
fail = true fail = true