1
0
Fork 0
mirror of https://github.com/vbatts/git-validation.git synced 2025-05-29 16:22:26 +00:00

*: comments and golint

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2015-10-05 18:55:05 -04:00
parent 07a982ff94
commit 5e74abd1b2
2 changed files with 8 additions and 1 deletions

View file

@ -13,14 +13,17 @@ func init() {
}
var (
// ValidDCO is the regexp for signed off DCO
ValidDCO = regexp.MustCompile(`^Signed-off-by: ([^<]+) <([^<>@]+@[^<>]+)>$`)
DcoRule = validate.Rule{
// DcoRule is the rule being registered
DcoRule = validate.Rule{
Name: "DCO",
Description: "makes sure the commits are signed",
Run: ValidateDCO,
}
)
// ValidateDCO is the ValidateRule for a git commit
func ValidateDCO(c git.CommitEntry) (vr validate.Result) {
vr.CommitEntry = c
if len(strings.Split(c["parent"], " ")) > 1 {