opts guard and removing severity

This commit is contained in:
zach rice committed 2019-11-12 15:18:13 -05:00
1 parent e446ba0738
commit 315ee56024
17 files changed
+99 -121

No files matched your search

+4 -2
View File
@@ -17,6 +17,7 @@ import (
"gopkg.in/src-d/go-git.v4/storage/memory"
"io"
"os"
"path"
"sync"
"time"
)
@@ -76,9 +77,9 @@ func (repo *Repo) Clone(cloneOption *git.CloneOptions) error {
return nil
}
// AuditLocal will do a `git diff` and scan changed files that are being tracked. This is useful functionality
// AuditUncommitted will do a `git diff` and scan changed files that are being tracked. This is useful functionality
// for a pre-commit hook so you can make sure your code does not have any leaks before committing.
func (repo *Repo) AuditLocal() error {
func (repo *Repo) AuditUncommitted() error {
auditTimeStart := time.Now()
r, err := repo.Head()
@@ -277,6 +278,7 @@ func (repo *Repo) Open() error {
return err
}
repo.Repository = repository
repo.Name = path.Base(dir)
}
return nil
}