fix: formatting directive bugs in test (#2134)
I'm getting a build error in my builds because nogo complains about this
bug. I guess I could configure my nogo to no check this code, but I
think it should be fixed.
---------
Co-authored-by: Ignas Anikevicius <240938+aignas@users.noreply.github.com>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1b457c4..91554c4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -27,6 +27,9 @@
### Changed
* Nothing yet
+### Fixed
+* (gazelle): Fix incorrect use of `t.Fatal`/`t.Fatalf` in tests.
+
### Added
* Nothing yet
diff --git a/gazelle/manifest/test/test.go b/gazelle/manifest/test/test.go
index 506c7d2..a7647f3 100644
--- a/gazelle/manifest/test/test.go
+++ b/gazelle/manifest/test/test.go
@@ -33,12 +33,12 @@
func TestGazelleManifestIsUpdated(t *testing.T) {
requirementsPath := os.Getenv("_TEST_REQUIREMENTS")
if requirementsPath == "" {
- t.Fatalf("_TEST_REQUIREMENTS must be set")
+ t.Fatal("_TEST_REQUIREMENTS must be set")
}
manifestPath := os.Getenv("_TEST_MANIFEST")
if manifestPath == "" {
- t.Fatalf("_TEST_MANIFEST must be set")
+ t.Fatal("_TEST_MANIFEST must be set")
}
manifestFile := new(manifest.File)
@@ -53,7 +53,7 @@
manifestGeneratorHashPath, err := runfiles.Rlocation(
os.Getenv("_TEST_MANIFEST_GENERATOR_HASH"))
if err != nil {
- t.Fatal("failed to resolve runfiles path of manifest: %v", err)
+ t.Fatalf("failed to resolve runfiles path of manifest: %v", err)
}
manifestGeneratorHash, err := os.Open(manifestGeneratorHashPath)