zricethezav 8 лет назад
Родитель
Сommit
25736d115f
3 измененных файлов с 3 добавлено и 4 удалено
  1. 2 2
      checks_test.go
  2. 1 1
      options.go
  3. 0 1
      repo.go

+ 2 - 2
checks_test.go

@@ -6,7 +6,7 @@ import (
 
 func TestCheckRegex(t *testing.T) {
 	var results []Leak
-	opts := &Options{
+	opts = &Options{
 		Concurrency:      10,
 		B64EntropyCutoff: 70,
 		HexEntropyCutoff: 40,
@@ -22,7 +22,7 @@ func TestCheckRegex(t *testing.T) {
 	}
 
 	for k, v := range checks {
-		results = doChecks(k, commit, opts, repo)
+		results = doChecks(k, commit, &repo)
 		if v != len(results) {
 			t.Errorf("regexCheck failed on string %s", k)
 		}

+ 1 - 1
options.go

@@ -317,6 +317,6 @@ func (opts *Options) setupLogger() {
 
 // isGithubTarget checks if url is a valid github target
 func isGithubTarget(url string) bool {
-	re := regexp.MustCompile("github\\.com\\/")
+	re := regexp.MustCompile("github.com")
 	return re.MatchString(url)
 }

+ 0 - 1
repo.go

@@ -228,7 +228,6 @@ func reportAggregator(gitLeakReceiverWG *sync.WaitGroup, gitLeaks chan Leak, lea
 			}
 			fmt.Println(string(b))
 		}
-
 		gitLeakReceiverWG.Done()
 	}
 }