Skip to content

Commit

Permalink
fix(policy): return error in conventional commit report (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrynhard authored Oct 8, 2018
1 parent 7d19c82 commit 2ac5059
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ require (
github.com/spf13/cast v1.1.0 // indirect
github.com/spf13/cobra v0.0.0-20170629105234-8c6fa02d2225
github.com/spf13/jwalterweatherman v0.0.0-20170523133247-0efa5202c046 // indirect
github.com/spf13/pflag v1.0.0 // indirect
github.com/spf13/pflag v1.0.0
github.com/spf13/viper v0.0.0-20170619124313-c1de95864d73
github.com/src-d/gcfg v1.3.0 // indirect
github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50 // indirect
Expand Down
4 changes: 2 additions & 2 deletions pkg/policy/conventionalcommit/conventionalcommit.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"regexp"
"strings"

log "github.com/Sirupsen/logrus"
"github.com/autonomy/conform/pkg/metadata"
"github.com/autonomy/conform/pkg/pipeline"
"github.com/autonomy/conform/pkg/policy"
Expand Down Expand Up @@ -47,7 +46,8 @@ func (c *Conventional) Compliance(metadata *metadata.Metadata, options ...policy
if commitMsgFile != "" {
contents, err := ioutil.ReadFile(commitMsgFile)
if err != nil {
log.Fatal(err)
report.Errors = append(report.Errors, fmt.Errorf("failed to read commit message file: %v", err))
return
}
msg = string(contents)
}
Expand Down

0 comments on commit 2ac5059

Please sign in to comment.