Skip to content

Commit

Permalink
fix(policy): check the entire commit header length (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrynhard authored Jul 23, 2017
1 parent bd3404a commit 44d4ef0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/policy/conventionalcommit/conventionalcommit.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ func (c *Conventional) Tasks(map[string]*task.Task) policy.Option {

// ValidateHeaderLength checks the header length.
func ValidateHeaderLength(report *policy.Report, groups []string) {
if len(groups[1]) > MaxNumberOfCommitCharacters {
report.Errors = append(report.Errors, fmt.Errorf("Commit header is %d characters", len(groups[1])))
if len(groups[0]) > MaxNumberOfCommitCharacters {
report.Errors = append(report.Errors, fmt.Errorf("Commit header is %d characters", len(groups[0])))
}
}

Expand Down

0 comments on commit 44d4ef0

Please sign in to comment.