1
0
mirror of https://github.com/securego/gosec.git synced 2025-11-27 22:28:20 +02:00

fix hound-ci errors

This commit is contained in:
Grant Murphy
2017-12-13 17:39:00 +10:00
parent 97cde35f32
commit cfa432729c
9 changed files with 45 additions and 19 deletions

View File

@@ -20,6 +20,7 @@ type buildObj struct {
program *loader.Program
}
// TestPackage is a mock package for testing purposes
type TestPackage struct {
Path string
Files map[string]string
@@ -27,7 +28,7 @@ type TestPackage struct {
build *buildObj
}
// NewPackage will create a new and empty package. Must call Close() to cleanup
// NewTestPackage will create a new and empty package. Must call Close() to cleanup
// auxilary files
func NewTestPackage() *TestPackage {
// Files must exist in $GOPATH
@@ -76,8 +77,8 @@ func (p *TestPackage) Build() error {
return err
}
var packageFiles []string
packageConfig := loader.Config{Build: &build.Default, ParserMode: parser.ParseComments}
packageFiles := make([]string, 0)
for _, filename := range basePackage.GoFiles {
packageFiles = append(packageFiles, path.Join(p.Path, filename))
}