diff --git a/analyzer.go b/analyzer.go index 4b66d4d..b186348 100644 --- a/analyzer.go +++ b/analyzer.go @@ -114,7 +114,7 @@ func (gosec *Analyzer) Process(buildTags []string, packagePaths ...string) error gosec.logger.Printf("Skipping: %s. Path doesn't exist.", abspath) continue } - gosec.logger.Println("Searching directory:", abspath) + gosec.logger.Println("Import directory:", abspath) basePackage, err := build.Default.ImportDir(packagePath, build.ImportComment) if err != nil { @@ -133,7 +133,6 @@ func (gosec *Analyzer) Process(buildTags []string, packagePaths ...string) error pkgs = append(pkgs, _pkgs...) } - for _, packageInfo := range pkgs { if len(packageInfo.Errors) != 0 { for _, packErr := range packageInfo.Errors { @@ -166,7 +165,7 @@ func (gosec *Analyzer) Process(buildTags []string, packagePaths ...string) error sortErrors(gosec.errors) // sorts errors by line and column in the file for _, pkg := range pkgs { - gosec.logger.Println("Checking package:", pkg.String()) + gosec.logger.Println("Checking package:", pkg.Name) for _, file := range pkg.Syntax { gosec.logger.Println("Checking file:", pkg.Fset.File(file.Pos()).Name()) gosec.context.FileSet = pkg.Fset