mirror of
https://github.com/securego/gosec.git
synced 2024-12-24 11:35:52 +00:00
Fix test: update test to comply with the spec of generated sources
https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source says: > This line must appear before the first non-comment, non-blank text in the file. Original test cases fail with the previous commit because test source does not comply with this spec. So, probably we should update test case to comply with the spec. (This is a breaking change, though)
This commit is contained in:
parent
3a0ea5176b
commit
ccb0a08221
1 changed files with 2 additions and 2 deletions
|
@ -498,8 +498,8 @@ var _ = Describe("Analyzer", func() {
|
|||
pkg := testutils.NewTestPackage()
|
||||
defer pkg.Close()
|
||||
pkg.AddFile("foo.go", `
|
||||
package foo
|
||||
// Code generated some-generator DO NOT EDIT.
|
||||
package foo
|
||||
func test() error {
|
||||
return nil
|
||||
}
|
||||
|
@ -541,8 +541,8 @@ var _ = Describe("Analyzer", func() {
|
|||
pkg := testutils.NewTestPackage()
|
||||
defer pkg.Close()
|
||||
pkg.AddFile("foo.go", `
|
||||
package main
|
||||
// Code generated some-generator DO NOT EDIT.
|
||||
package main
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue