diff options
author | Jay Conrod <jayconrod@gmail.com> | 2018-05-23 17:32:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-23 17:32:17 -0400 |
commit | 0b731fe1dc34cca054349061d79b3359ccdf29af (patch) | |
tree | 6a64f91edf4ff8c63e939ca398362c9bc7802d54 /tests/legacy | |
parent | 6ed1cd146058991b8d0691e232d9b537f7becf73 (diff) | |
download | bazelbuild-rules_go-0b731fe1dc34cca054349061d79b3359ccdf29af.tar.gz |
Format .bzl files with buildifier
Fixes #1458
Diffstat (limited to 'tests/legacy')
-rw-r--r-- | tests/legacy/examples/cgo/example_command/generate_test.bzl | 10 | ||||
-rw-r--r-- | tests/legacy/race/generate_test.bzl | 10 | ||||
-rw-r--r-- | tests/legacy/test_chdir/remote.bzl | 12 |
3 files changed, 16 insertions, 16 deletions
diff --git a/tests/legacy/examples/cgo/example_command/generate_test.bzl b/tests/legacy/examples/cgo/example_command/generate_test.bzl index af264e9f..53ceee7a 100644 --- a/tests/legacy/examples/cgo/example_command/generate_test.bzl +++ b/tests/legacy/examples/cgo/example_command/generate_test.bzl @@ -1,11 +1,11 @@ def _generate_script_impl(ctx): - script_file = ctx.actions.declare_file(ctx.label.name + ".bash") - ctx.actions.write(output=script_file, is_executable=True, content=""" + script_file = ctx.actions.declare_file(ctx.label.name + ".bash") + ctx.actions.write(output = script_file, is_executable = True, content = """ {0} """.format(ctx.file.binary.short_path)) - return struct( - files = depset([script_file]), - ) + return struct( + files = depset([script_file]), + ) generate_script = rule( _generate_script_impl, diff --git a/tests/legacy/race/generate_test.bzl b/tests/legacy/race/generate_test.bzl index 14cbd246..75f2b20f 100644 --- a/tests/legacy/race/generate_test.bzl +++ b/tests/legacy/race/generate_test.bzl @@ -1,6 +1,6 @@ def _generate_script_impl(ctx): - script_file = ctx.actions.declare_file(ctx.label.name + ".bash") - ctx.actions.write(output=script_file, is_executable=True, content=""" + script_file = ctx.actions.declare_file(ctx.label.name + ".bash") + ctx.actions.write(output = script_file, is_executable = True, content = """ OUTPUT="$({0} 2>&1)" if [ $? -eq 0 ]; then echo success @@ -15,9 +15,9 @@ if [[ $OUTPUT != *"WARNING: DATA RACE"* ]]; then fi exit 0 """.format(ctx.file.binary.short_path)) - return struct( - files = depset([script_file]), - ) + return struct( + files = depset([script_file]), + ) generate_script = rule( _generate_script_impl, diff --git a/tests/legacy/test_chdir/remote.bzl b/tests/legacy/test_chdir/remote.bzl index 4067ec16..03642fe2 100644 --- a/tests/legacy/test_chdir/remote.bzl +++ b/tests/legacy/test_chdir/remote.bzl @@ -1,9 +1,9 @@ def _test_chdir_remote_impl(ctx): - ctx.file("WORKSPACE", """workspace("test_chdir_remote")""") - ctx.file("BUILD.bazel", "") - for f in ["BUILD.bazel", "data_test.go", "data.txt"]: - input = Label("@io_bazel_rules_go//tests/legacy/test_chdir:{}".format(f)) - ctx.template("sub/" + f, input) + ctx.file("WORKSPACE", """workspace("test_chdir_remote")""") + ctx.file("BUILD.bazel", "") + for f in ["BUILD.bazel", "data_test.go", "data.txt"]: + input = Label("@io_bazel_rules_go//tests/legacy/test_chdir:{}".format(f)) + ctx.template("sub/" + f, input) _test_chdir_remote = repository_rule( implementation = _test_chdir_remote_impl, @@ -11,4 +11,4 @@ _test_chdir_remote = repository_rule( ) def test_chdir_remote(): - _test_chdir_remote(name="test_chdir_remote")
\ No newline at end of file + _test_chdir_remote(name = "test_chdir_remote") |