diff --git a/go.mod b/go.mod index 7590bf03..1cb6e9f4 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/pkg/policy/conventionalcommit/conventionalcommit.go b/pkg/policy/conventionalcommit/conventionalcommit.go index 675b9c6f..073d6fa7 100644 --- a/pkg/policy/conventionalcommit/conventionalcommit.go +++ b/pkg/policy/conventionalcommit/conventionalcommit.go @@ -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" @@ -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) }