sourcegraph/dev/go_defs.bzl
Greg Magolan afc8577b6f
build: add buildifier check to Aspect Workflows (#58566)
* build: add buildifier check to Aspect Workflows

* exclude squirrel/test_repos/starlark

* buildifier

---------

Co-authored-by: William Bezuidenhout <william.bezuidenhout@sourcegraph.com>
2023-11-27 14:58:01 +02:00

20 lines
578 B
Python

load("@io_bazel_rules_go//go:def.bzl", _go_test = "go_test")
def go_test(**kwargs):
# All go tests have their timeout set to short by default, unless specified otherwise.
if "timeout" not in kwargs:
kwargs["timeout"] = "short"
# All go tests have the race detector turned on
if "race" not in kwargs:
kwargs["race"] = "on"
# All go tests are tagged with "go" by default
if "tags" in kwargs:
if "go" not in kwargs["tags"]:
kwargs["tags"].append("go")
else:
kwargs["tags"] = ["go"]
_go_test(**kwargs)