forked from TrueCloudLab/dco-go
[#7] Check empty line after commit's header
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
This commit is contained in:
parent
b8aea16a20
commit
a9d9c0d077
1 changed files with 7 additions and 0 deletions
7
main.go
7
main.go
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue