From ccb0a0822100dfe0efb53b6ba7dfe76445ac433f Mon Sep 17 00:00:00 2001 From: nobishino Date: Thu, 7 Mar 2024 22:37:59 +0900 Subject: [PATCH] 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) --- analyzer_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/analyzer_test.go b/analyzer_test.go index 5d8b947afe..73b7ee6afb 100644 --- a/analyzer_test.go +++ b/analyzer_test.go @@ -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" )