bp2build: codegen singleton lists on one line.
This CL refactors the bp2build code generator to pretty print lists with
a single element on one line, instead of taking up three lines, which
can make BUILD files unnecessarily long. A single line singleton list is
also more commonly used in BUILD files.
Test: TH
Change-Id: Ic9e44741bbb070c8f45925466b9ccdd0608498b2
diff --git a/bp2build/sh_conversion_test.go b/bp2build/sh_conversion_test.go
index 2aa373c..37f542e 100644
--- a/bp2build/sh_conversion_test.go
+++ b/bp2build/sh_conversion_test.go
@@ -74,9 +74,7 @@
}`,
expectedBazelTargets: []string{`sh_binary(
name = "foo",
- srcs = [
- "foo.sh",
- ],
+ srcs = ["foo.sh"],
)`},
},
}