Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
[chore] - address linter (#3133)
ahravfd257350dd42
diff --git a/pkg/gitparse/gitparse.go b/pkg/gitparse/gitparse.goindex e1db17f64..7a827808f 100644--- a/pkg/gitparse/gitparse.go+++ b/pkg/gitparse/gitparse.go@@ -221,7 +221,14 @@ func NewParser(options ...Option) *Parser {// RepoPath parses the output of the `git log` command for the `source` path.// The Diff chan will return diffs in the order they are parsed from the log.-func (c *Parser) RepoPath(ctx context.Context, source string, head string, abbreviatedLog bool, excludedGlobs []string, isBare bool) (chan *Diff, error) {+func (c *Parser) RepoPath(+ ctx context.Context,+ source string,+ head string,+ abbreviatedLog bool,+ excludedGlobs []string,+ isBare bool,+) (chan *Diff, error) {args := []string{"-C", source,"log",@@ -240,7 +247,7 @@ func (c *Parser) RepoPath(ctx context.Context, source string, head string, abbreargs = append(args, "--all")}for _, glob := range excludedGlobs {- args = append(args, "--", ".", fmt.Sprintf(":(exclude)%s", glob))+ args = append(args, "--", ".", ":(exclude)"+glob)}cmd := exec.Command("git", args...)@@ -275,7 +282,7 @@ func (c *Parser) Staged(ctx context.Context, source string) (chan *Diff, error)absPath, err := filepath.Abs(source)if err == nil {- cmd.Env = append(cmd.Env, fmt.Sprintf("GIT_DIR=%s", filepath.Join(absPath, ".git")))+ cmd.Env = append(cmd.Env, "GIT_DIR="+filepath.Join(absPath, ".git"))}return c.executeCommand(ctx, cmd, true)