mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 13:14:22 +01:00
opts guard and removing severity
This commit is contained in:
1 parent
e446ba0738
commit
315ee56024
17 files changed
+99
-121
No files matched your search
+1
-3
@@ -20,7 +20,6 @@ func Run(m *manager.Manager) error {
|
||||
}
|
||||
m.Opts.RepoPath = fmt.Sprintf("%s/%s", m.Opts.OwnerPath, f.Name())
|
||||
if err := runHelper(NewRepo(m)); err != nil {
|
||||
// TODO or send to errchan?
|
||||
return err
|
||||
}
|
||||
}
|
||||
@@ -31,7 +30,6 @@ func Run(m *manager.Manager) error {
|
||||
}
|
||||
|
||||
func runHelper(r *Repo) error {
|
||||
// Check if gitleaks will perform a local audit.
|
||||
if r.Manager.Opts.OpenLocal() {
|
||||
r.Name = path.Base(r.Manager.Opts.RepoPath)
|
||||
if err := r.Open(); err != nil {
|
||||
@@ -41,7 +39,7 @@ func runHelper(r *Repo) error {
|
||||
// Check if we are checking uncommitted files. This is the default behavior
|
||||
// for a "$gitleaks" command with no options set
|
||||
if r.Manager.Opts.CheckUncommitted() {
|
||||
if err := r.AuditLocal(); err != nil {
|
||||
if err := r.AuditUncommitted(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in new issue
Block a user