Format all .gn and .gni files of examples

`gn format` recently changed its formatting behavior
for deps, source, and a few other elements when they
are assigned (with =) single-element lists to be consistent
with the formatting of updates (with +=) with single-element.

Bug: crbug.com/chromium/1041419
Change-Id: I73051f15dff2c33f1ee250d24ea43aba2ed5d076
Reviewed-on: https://gn-review.googlesource.com/c/gn/+/7160
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
diff --git a/examples/ios/build/config/ios/templates/ios_app_bundle.gni b/examples/ios/build/config/ios/templates/ios_app_bundle.gni
index e83a79b..a82a5fa 100644
--- a/examples/ios/build/config/ios/templates/ios_app_bundle.gni
+++ b/examples/ios/build/config/ios/templates/ios_app_bundle.gni
@@ -48,9 +48,7 @@
   action(_app_prefix_target) {
     script = "//build/config/ios/scripts/find_app_identifier_prefix.py"
     sources = []
-    outputs = [
-      _app_prefix_output,
-    ]
+    outputs = [ _app_prefix_output ]
     args = [
       "-b=" + _bundle_identifier,
       "-o=" + rebase_path(_app_prefix_output, root_build_dir),
@@ -67,9 +65,7 @@
       output = _simu_xcent_output
       plists = [ "//build/config/ios/resources/Entitlements-Simulated.plist" ]
       substitutions_json = _app_prefix_output
-      deps = [
-        ":$_app_prefix_target",
-      ]
+      deps = [ ":$_app_prefix_target" ]
     }
   }
 
@@ -121,15 +117,9 @@
   }
 
   bundle_data(_executable_bundle) {
-    public_deps = [
-      ":$_executable_target",
-    ]
-    sources = [
-      "$target_out_dir/$_executable_target/$_output_name",
-    ]
-    outputs = [
-      "{{bundle_executable_dir}}/{{source_file_part}}",
-    ]
+    public_deps = [ ":$_executable_target" ]
+    sources = [ "$target_out_dir/$_executable_target/$_output_name" ]
+    outputs = [ "{{bundle_executable_dir}}/{{source_file_part}}" ]
   }
 
   ios_binary_bundle(target_name) {
@@ -152,8 +142,6 @@
     bundle_extension = "app"
     bundle_type = "AAPL"
 
-    public_deps = [
-      ":$_executable_bundle",
-    ]
+    public_deps = [ ":$_executable_bundle" ]
   }
 }
diff --git a/examples/ios/build/config/ios/templates/ios_binary_bundle.gni b/examples/ios/build/config/ios/templates/ios_binary_bundle.gni
index 0089cd7..1a3d629 100644
--- a/examples/ios/build/config/ios/templates/ios_binary_bundle.gni
+++ b/examples/ios/build/config/ios/templates/ios_binary_bundle.gni
@@ -90,21 +90,13 @@
       plists += [ invoker.info_plist ]
     }
 
-    deps = [
-      "//build/config/ios:compiler_plist",
-    ]
+    deps = [ "//build/config/ios:compiler_plist" ]
   }
 
   bundle_data(_plist_bundle) {
-    public_deps = [
-      ":$_plist_target",
-    ]
-    sources = [
-      "$target_out_dir/$_plist_target/Info.plist",
-    ]
-    outputs = [
-      "{{bundle_contents_dir}}/Info.plist",
-    ]
+    public_deps = [ ":$_plist_target" ]
+    sources = [ "$target_out_dir/$_plist_target/Info.plist" ]
+    outputs = [ "{{bundle_contents_dir}}/Info.plist" ]
   }
 
   create_bundle(target_name) {
diff --git a/examples/ios/build/config/ios/templates/ios_framework_bundle.gni b/examples/ios/build/config/ios/templates/ios_framework_bundle.gni
index 471f4f3..13db266 100644
--- a/examples/ios/build/config/ios/templates/ios_framework_bundle.gni
+++ b/examples/ios/build/config/ios/templates/ios_framework_bundle.gni
@@ -79,15 +79,9 @@
   }
 
   bundle_data(_dylib_bundle) {
-    public_deps = [
-      ":$_dylib_target",
-    ]
-    sources = [
-      "$target_out_dir/$_dylib_target/$_output_name",
-    ]
-    outputs = [
-      "{{bundle_executable_dir}}/{{source_file_part}}",
-    ]
+    public_deps = [ ":$_dylib_target" ]
+    sources = [ "$target_out_dir/$_dylib_target/$_output_name" ]
+    outputs = [ "{{bundle_executable_dir}}/{{source_file_part}}" ]
   }
 
   if (defined(invoker.public_headers)) {
@@ -97,9 +91,7 @@
     action(_umbrella_target) {
       script = "//build/config/ios/scripts/generate_umbrella_header.py"
       sources = []
-      outputs = [
-        _umbrella_output,
-      ]
+      outputs = [ _umbrella_output ]
       args = [ "-o=" + rebase_path(_umbrella_output, root_build_dir) ] +
              rebase_path(invoker.public_headers, root_build_dir)
     }
@@ -108,12 +100,8 @@
 
     bundle_data(_headers_bundle) {
       sources = invoker.public_headers + [ _umbrella_output ]
-      outputs = [
-        "{{bundle_resources_dir}}/Headers/{{source_file_part}}",
-      ]
-      public_deps = [
-        ":$_umbrella_target",
-      ]
+      outputs = [ "{{bundle_resources_dir}}/Headers/{{source_file_part}}" ]
+      public_deps = [ ":$_umbrella_target" ]
     }
   }
 
@@ -145,9 +133,7 @@
     bundle_extension = "framework"
     bundle_type = "FMWK"
 
-    public_deps = [
-      ":$_dylib_bundle",
-    ]
+    public_deps = [ ":$_dylib_bundle" ]
 
     if (defined(invoker.public_headers)) {
       public_deps += [ ":$_headers_bundle" ]
@@ -159,14 +145,8 @@
   _target_name = target_name
 
   bundle_data("$target_name+bundle") {
-    public_deps = [
-      ":$_target_name",
-    ]
-    sources = [
-      "$root_out_dir/$_output_name.framework",
-    ]
-    outputs = [
-      "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}",
-    ]
+    public_deps = [ ":$_target_name" ]
+    sources = [ "$root_out_dir/$_output_name.framework" ]
+    outputs = [ "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}" ]
   }
 }
diff --git a/examples/ios/build/config/ios/templates/merge_plist.gni b/examples/ios/build/config/ios/templates/merge_plist.gni
index 61d3518..f48432b 100644
--- a/examples/ios/build/config/ios/templates/merge_plist.gni
+++ b/examples/ios/build/config/ios/templates/merge_plist.gni
@@ -63,9 +63,7 @@
 
     script = "//build/config/ios/scripts/merge_plist.py"
     sources = invoker.plists
-    outputs = [
-      invoker.output,
-    ]
+    outputs = [ invoker.output ]
 
     _format = "json"
     if (defined(invoker.format)) {
@@ -78,9 +76,7 @@
     ]
 
     if (defined(_substitutions_json)) {
-      inputs = [
-        _substitutions_json,
-      ]
+      inputs = [ _substitutions_json ]
       args += [ "-s=" + rebase_path(_substitutions_json) ]
     }
 
diff --git a/examples/ios/build/config/ios/templates/storyboards.gni b/examples/ios/build/config/ios/templates/storyboards.gni
index ecb5662..de36ef3 100644
--- a/examples/ios/build/config/ios/templates/storyboards.gni
+++ b/examples/ios/build/config/ios/templates/storyboards.gni
@@ -15,9 +15,7 @@
   action_foreach(_compile_target) {
     script = "//build/config/ios/scripts/compile_storyboard.py"
     sources = invoker.sources
-    outputs = [
-      _compile_output,
-    ]
+    outputs = [ _compile_output ]
     args = [
       "{{source}}",
       "-o=" + rebase_path(_compile_output, root_build_dir),
@@ -26,12 +24,8 @@
   }
 
   bundle_data(target_name) {
-    public_deps = [
-      ":$_compile_target",
-    ]
+    public_deps = [ ":$_compile_target" ]
     sources = get_target_outputs(":$_compile_target")
-    outputs = [
-      "{{bundle_root_dir}}/Base.lproj/{{source_file_part}}",
-    ]
+    outputs = [ "{{bundle_root_dir}}/Base.lproj/{{source_file_part}}" ]
   }
 }
diff --git a/examples/ios/build/toolchain/ios/BUILD.gn b/examples/ios/build/toolchain/ios/BUILD.gn
index 758f449..b4e0869 100644
--- a/examples/ios/build/toolchain/ios/BUILD.gn
+++ b/examples/ios/build/toolchain/ios/BUILD.gn
@@ -30,9 +30,7 @@
       rspfile = output + ".rsp"
       rspfile_content = "{{inputs_newline}}"
 
-      outputs = [
-        output,
-      ]
+      outputs = [ output ]
       command = "$cxx {{ldflags}} -o $output -Wl,-filelist,$rspfile {{libs}} {{solibs}} {{frameworks}}"
       description = "LINK {{output}}"
 
@@ -46,9 +44,7 @@
       rspfile = dylib + ".rsp"
       rspfile_content = "{{inputs_newline}}"
 
-      outputs = [
-        dylib,
-      ]
+      outputs = [ dylib ]
       command = "$cxx -dynamiclib {{ldflags}} -o $dylib -Wl,-filelist,$rspfile {{libs}} {{solibs}} {{frameworks}}"
       description = "SOLINK {{output}}"
 
@@ -63,9 +59,7 @@
       command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}"
       depsformat = "gcc"
       description = "CC {{output}}"
-      outputs = [
-        "{{target_out_dir}}/{{label_name}}/{{source_name_part}}.o",
-      ]
+      outputs = [ "{{target_out_dir}}/{{label_name}}/{{source_name_part}}.o" ]
     }
 
     tool("cxx") {
@@ -74,9 +68,7 @@
       command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} -c {{source}} -o {{output}}"
       depsformat = "gcc"
       description = "CXX {{output}}"
-      outputs = [
-        "{{target_out_dir}}/{{label_name}}/{{source_name_part}}.o",
-      ]
+      outputs = [ "{{target_out_dir}}/{{label_name}}/{{source_name_part}}.o" ]
     }
 
     tool("objc") {
@@ -85,9 +77,7 @@
       command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{framework_dirs}} {{cflags}} {{cflags_objc}} -c {{source}} -o {{output}}"
       depsformat = "gcc"
       description = "OBJC {{output}}"
-      outputs = [
-        "{{target_out_dir}}/{{label_name}}/{{source_name_part}}.o",
-      ]
+      outputs = [ "{{target_out_dir}}/{{label_name}}/{{source_name_part}}.o" ]
     }
 
     tool("objcxx") {
@@ -96,9 +86,7 @@
       command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{framework_dirs}} {{cflags}} {{cflags_objcc}} -c {{source}} -o {{output}}"
       depsformat = "gcc"
       description = "OBJCXX {{output}}"
-      outputs = [
-        "{{target_out_dir}}/{{label_name}}/{{source_name_part}}.o",
-      ]
+      outputs = [ "{{target_out_dir}}/{{label_name}}/{{source_name_part}}.o" ]
     }
 
     tool("stamp") {
diff --git a/examples/ios/build/toolchain/mac/BUILD.gn b/examples/ios/build/toolchain/mac/BUILD.gn
index 30937dd..045a90f 100644
--- a/examples/ios/build/toolchain/mac/BUILD.gn
+++ b/examples/ios/build/toolchain/mac/BUILD.gn
@@ -19,9 +19,7 @@
       rspfile = output + ".rsp"
       rspfile_content = "{{inputs_newline}}"
 
-      outputs = [
-        output,
-      ]
+      outputs = [ output ]
       command = "$cxx {{ldflags}} -o $output -Wl,-filelist,$rspfile {{libs}} {{solibs}} {{frameworks}}"
       description = "LINK {{output}}"
 
@@ -35,9 +33,7 @@
       rspfile = dylib + ".rsp"
       rspfile_content = "{{inputs_newline}}"
 
-      outputs = [
-        dylib,
-      ]
+      outputs = [ dylib ]
       command = "$cxx -dynamiclib {{ldflags}} -o $dylib -Wl,-filelist,$rspfile {{libs}} {{solibs}} {{frameworks}}"
       description = "SOLINK {{output}}"
 
@@ -52,9 +48,7 @@
       command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}"
       depsformat = "gcc"
       description = "CC {{output}}"
-      outputs = [
-        "{{target_out_dir}}/{{label_name}}/{{source_name_part}}.o",
-      ]
+      outputs = [ "{{target_out_dir}}/{{label_name}}/{{source_name_part}}.o" ]
     }
 
     tool("cxx") {
@@ -63,9 +57,7 @@
       command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} -c {{source}} -o {{output}}"
       depsformat = "gcc"
       description = "CXX {{output}}"
-      outputs = [
-        "{{target_out_dir}}/{{label_name}}/{{source_name_part}}.o",
-      ]
+      outputs = [ "{{target_out_dir}}/{{label_name}}/{{source_name_part}}.o" ]
     }
 
     tool("objc") {
@@ -74,9 +66,7 @@
       command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{framework_dirs}} {{cflags}} {{cflags_objc}} -c {{source}} -o {{output}}"
       depsformat = "gcc"
       description = "OBJC {{output}}"
-      outputs = [
-        "{{target_out_dir}}/{{label_name}}/{{source_name_part}}.o",
-      ]
+      outputs = [ "{{target_out_dir}}/{{label_name}}/{{source_name_part}}.o" ]
     }
 
     tool("objcxx") {
@@ -85,9 +75,7 @@
       command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{framework_dirs}} {{cflags}} {{cflags_objcc}} -c {{source}} -o {{output}}"
       depsformat = "gcc"
       description = "OBJCXX {{output}}"
-      outputs = [
-        "{{target_out_dir}}/{{label_name}}/{{source_name_part}}.o",
-      ]
+      outputs = [ "{{target_out_dir}}/{{label_name}}/{{source_name_part}}.o" ]
     }
 
     tool("stamp") {
diff --git a/examples/ios/host/BUILD.gn b/examples/ios/host/BUILD.gn
index 5bf2ea0..90a789f 100644
--- a/examples/ios/host/BUILD.gn
+++ b/examples/ios/host/BUILD.gn
@@ -4,14 +4,10 @@
 
 if (current_toolchain == host_toolchain) {
   executable("username") {
-    sources = [
-      "main.cc",
-    ]
+    sources = [ "main.cc" ]
   }
 } else {
   group("username") {
-    deps = [
-      ":username($host_toolchain)",
-    ]
+    deps = [ ":username($host_toolchain)" ]
   }
 }
diff --git a/examples/rust_example/BUILD.gn b/examples/rust_example/BUILD.gn
index e28f023..964b331 100644
--- a/examples/rust_example/BUILD.gn
+++ b/examples/rust_example/BUILD.gn
@@ -1,5 +1,3 @@
 group("default") {
-  deps = [
-    "//hello_world/src:hello_world",
-  ]
+  deps = [ "//hello_world/src:hello_world" ]
 }
diff --git a/examples/rust_example/build/BUILD.gn b/examples/rust_example/build/BUILD.gn
index 52a0fcb..3b6b8dc 100644
--- a/examples/rust_example/build/BUILD.gn
+++ b/examples/rust_example/build/BUILD.gn
@@ -4,9 +4,7 @@
     outfile = "{{target_out_dir}}/{{crate_name}}"
     command = "rustc --crate-name {{crate_name}} {{source}} --crate-type {{crate_type}} --emit=dep-info=$depfile,link {{rustflags}} -o $outfile {{rustdeps}} {{externs}}"
     description = "RUST $outfile"
-    outputs = [
-      outfile,
-    ]
+    outputs = [ outfile ]
   }
 
   tool("rust_staticlib") {
@@ -14,9 +12,7 @@
     outfile = "{{target_out_dir}}/{{crate_name}}.a"
     command = "rustc --crate-name {{crate_name}} {{source}} --crate-type {{crate_type}} --emit=dep-info=$depfile,link {{rustflags}} -o $outfile {{rustdeps}} {{externs}}"
     description = "RUST $outfile"
-    outputs = [
-      outfile,
-    ]
+    outputs = [ outfile ]
   }
 
   tool("rust_rlib") {
@@ -24,9 +20,7 @@
     outfile = "{{target_out_dir}}/lib{{crate_name}}.rlib"
     command = "rustc --crate-name {{crate_name}} {{source}} --crate-type {{crate_type}} --emit=dep-info=$depfile,link {{rustflags}} -o $outfile {{rustdeps}} {{externs}}"
     description = "RUST $outfile"
-    outputs = [
-      outfile,
-    ]
+    outputs = [ outfile ]
   }
 
   tool("rust_cdylib") {
@@ -34,9 +28,7 @@
     outfile = "{{target_out_dir}}/lib{{crate_name}}.so"
     command = "rustc --crate-name {{crate_name}} {{source}} --crate-type {{crate_type}} --emit=dep-info=$depfile,link {{rustflags}} -o $outfile {{rustdeps}} {{externs}}"
     description = "RUST $outfile"
-    outputs = [
-      outfile,
-    ]
+    outputs = [ outfile ]
   }
 
   tool("stamp") {
diff --git a/examples/rust_example/hello_world/foo/src/BUILD.gn b/examples/rust_example/hello_world/foo/src/BUILD.gn
index b7b94e2..7525454 100644
--- a/examples/rust_example/hello_world/foo/src/BUILD.gn
+++ b/examples/rust_example/hello_world/foo/src/BUILD.gn
@@ -1,8 +1,4 @@
 rust_library("foo") {
-  sources = [
-    "lib.rs",
-  ]
-  deps = [
-    "//hello_world/bar/src:bar",
-  ]
+  sources = [ "lib.rs" ]
+  deps = [ "//hello_world/bar/src:bar" ]
 }
diff --git a/examples/rust_example/hello_world/src/BUILD.gn b/examples/rust_example/hello_world/src/BUILD.gn
index e55f289..d50b876 100644
--- a/examples/rust_example/hello_world/src/BUILD.gn
+++ b/examples/rust_example/hello_world/src/BUILD.gn
@@ -1,10 +1,6 @@
 executable("hello_world") {
-  sources = [
-    "main.rs",
-  ]
-  deps = [
-    "//hello_world/foo/src:foo",
-  ]
+  sources = [ "main.rs" ]
+  deps = [ "//hello_world/foo/src:foo" ]
   aliased_deps = {
     baz = "//hello_world/foo/src:foo"
   }
diff --git a/examples/simple_build/BUILD.gn b/examples/simple_build/BUILD.gn
index a18390e..965fc42 100644
--- a/examples/simple_build/BUILD.gn
+++ b/examples/simple_build/BUILD.gn
@@ -3,9 +3,7 @@
 # found in the LICENSE file.
 
 executable("hello") {
-  sources = [
-    "hello.cc",
-  ]
+  sources = [ "hello.cc" ]
 
   deps = [
     ":hello_shared",
diff --git a/examples/simple_build/build/toolchain/BUILD.gn b/examples/simple_build/build/toolchain/BUILD.gn
index d9457d7..98cc6ee 100644
--- a/examples/simple_build/build/toolchain/BUILD.gn
+++ b/examples/simple_build/build/toolchain/BUILD.gn
@@ -8,9 +8,8 @@
     command = "gcc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}"
     depsformat = "gcc"
     description = "CC {{output}}"
-    outputs = [
-      "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o",
-    ]
+    outputs =
+        [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o" ]
   }
 
   tool("cxx") {
@@ -18,9 +17,8 @@
     command = "g++ -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} -c {{source}} -o {{output}}"
     depsformat = "gcc"
     description = "CXX {{output}}"
-    outputs = [
-      "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o",
-    ]
+    outputs =
+        [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o" ]
   }
 
   tool("alink") {
@@ -28,9 +26,8 @@
     command = "rm -f {{output}} && ar rcs {{output}} @$rspfile"
     description = "AR {{target_output_name}}{{output_extension}}"
     rspfile_content = "{{inputs}}"
-    outputs = [
-      "{{target_out_dir}}/{{target_output_name}}{{output_extension}}",
-    ]
+    outputs =
+        [ "{{target_out_dir}}/{{target_output_name}}{{output_extension}}" ]
     default_output_extension = ".a"
     output_prefix = "lib"
   }
@@ -54,9 +51,7 @@
     # it (in which case {{output_dir}} will be what the target specifies).
     default_output_dir = "{{root_out_dir}}"
 
-    outputs = [
-      sofile,
-    ]
+    outputs = [ sofile ]
     link_output = sofile
     depend_output = sofile
     output_prefix = "lib"
@@ -69,9 +64,7 @@
     description = "LINK $outfile"
     default_output_dir = "{{root_out_dir}}"
     rspfile_content = "{{inputs}}"
-    outputs = [
-      outfile,
-    ]
+    outputs = [ outfile ]
   }
 
   tool("stamp") {