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
This commit is contained in:
Jingwen Chen
2021-04-08 14:40:57 +00:00
parent 6393098ecf
commit b4628eb03f
8 changed files with 142 additions and 354 deletions

View File

@@ -231,9 +231,7 @@ cc_library_static {
"implicit_include_1.h",
"implicit_include_2.h",
],
includes = [
".",
],
includes = ["."],
linkstatic = True,
srcs = [
"static_lib_1.cc",
@@ -246,9 +244,7 @@ cc_library_static {
"implicit_include_1.h",
"implicit_include_2.h",
],
includes = [
".",
],
includes = ["."],
linkstatic = True,
srcs = [
"static_lib_2.cc",
@@ -261,9 +257,7 @@ cc_library_static {
"implicit_include_1.h",
"implicit_include_2.h",
],
includes = [
".",
],
includes = ["."],
linkstatic = True,
srcs = [
"whole_static_lib_1.cc",
@@ -276,9 +270,7 @@ cc_library_static {
"implicit_include_1.h",
"implicit_include_2.h",
],
includes = [
".",
],
includes = ["."],
linkstatic = True,
srcs = [
"whole_static_lib_2.cc",