From 78b0d5cb26c54c0b038bc7b8991bd68931e44d29 Mon Sep 17 00:00:00 2001 From: Martin Kuntz Jacobsen Date: Mon, 9 Nov 2026 12:12:11 +0100 Subject: [PATCH] starlark: one-line docstrings, attr docs and keyword-only fsharp_bench (closes #9752) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Xut2hwESun1HL2eSVd1d5B --- deploy/rules/archive.bzl | 5 +---- deploy/rules/config.bzl | 5 +---- deploy/rules/crates.bzl | 7 +------ deploy/rules/github.bzl | 12 +----------- deploy/rules/maven.bzl | 6 +----- deploy/rules/native_probe.bzl | 2 +- deploy/rules/npm.bzl | 6 +----- deploy/rules/nuget.bzl | 6 +----- deploy/rules/octopus.bzl | 5 +---- deploy/rules/pypi.bzl | 8 +------- families/dotnet/fsharp/rules/defs.bzl | 2 +- generation/codegen.bzl | 14 +------------- java/rules/defs.bzl | 10 +--------- java/rules/jmh.bzl | 12 +++++------- javascript/rules/frameworks.bzl | 7 +------ kotlin/rules/defs.bzl | 22 ++-------------------- libs/starlark/fuzz.bzl | 11 +---------- ocaml/toolchain/opam.bzl | 11 ++--------- python/rules/defs.bzl | 17 ++++------------- quality/fsc.bzl | 5 +---- scala/rules/defs.bzl | 22 ++-------------------- 21 files changed, 31 insertions(+), 164 deletions(-) diff --git a/deploy/rules/archive.bzl b/deploy/rules/archive.bzl index 8dbcb04534..3b3c35e326 100644 --- a/deploy/rules/archive.bzl +++ b/deploy/rules/archive.bzl @@ -449,10 +449,7 @@ _consumer_tarball = rule( ) def consumer_archive(name, app, min_runtime, linkage = "dynamic", resources = [], runtime = [], notice = None, license_file = None, check_imports = True, format = "tar.gz", platform = None, tags = None, target_compatible_with = None, visibility = None, testonly = None): - """Packages one consumer app with runtime, resources, NOTICE and IDENTITY as a tar.gz or zip and sha256 file. - - `name` is the archive; `name_checksum` is its sha256 file. `name_stage` and `name_archive` are helpers. - """ + """Packages one consumer app with runtime, resources, NOTICE and IDENTITY as a tar.gz or zip and sha256 file. `name` is the archive; `name_checksum` is its sha256 file. `name_stage` and `name_archive` are helpers.""" (tarball, checksum) = archive_filenames(name, format) stage_target = name + "_stage" archive_target = name + "_archive" diff --git a/deploy/rules/config.bzl b/deploy/rules/config.bzl index 1fcbf6e9f7..a99e475d0d 100644 --- a/deploy/rules/config.bzl +++ b/deploy/rules/config.bzl @@ -40,10 +40,7 @@ def deploy_config(ctx, kind, values, runfiles): ] def deploy_identity(name, package, version, name_error, version_error): - """Returns the (package, version) a deploy macro publishes. - - The package defaults to the target name. An empty version means the launcher reads it from the manifest. - """ + """Returns the (package, version) a deploy macro publishes. The package defaults to the target name. An empty version means the launcher reads it from the manifest.""" pkg = package or name where = " (in " + native.package_name() + ":" + name + ")" error = name_error(pkg) diff --git a/deploy/rules/crates.bzl b/deploy/rules/crates.bzl index 5bc33e0d3a..112e139196 100644 --- a/deploy/rules/crates.bzl +++ b/deploy/rules/crates.bzl @@ -69,12 +69,7 @@ _crates_config = rule( ) def crates_deploy(name, crate, package = "", version = "", build_mode = "release", api_compat = "fail", api_baseline = "registry", sbom = None, size_budget = "", tags = [], visibility = None, testonly = False, target_compatible_with = []): - """Publishes staged crate sources as a local-first crates.io deployment. - - api_compat and api_baseline work as described under "Public API - compatibility" in the README; the tool is cargo-semver-checks, and the - git baseline needs a checked-in, standalone Cargo.toml. - """ + """Publishes staged crate sources as a local-first crates.io deployment. api_compat and api_baseline work as described under "Public API compatibility" in the README; the tool is cargo-semver-checks, and the git baseline needs a checked-in, standalone Cargo.toml.""" attrs = deploy_attrs(tags, visibility, testonly, target_compatible_with) pkg, version = deploy_identity(name, package, version, crates_name_error, crates_version_error) diff --git a/deploy/rules/github.bzl b/deploy/rules/github.bzl index 4b6b9f025b..284c766364 100644 --- a/deploy/rules/github.bzl +++ b/deploy/rules/github.bzl @@ -114,17 +114,7 @@ github_config = rule( ) def github_deploy(name, artifacts, release_tag = "", tag_from_head = False, build_mode = "release", sbom = None, notes = "commits", notes_file = None, api_compat = "fail", api_baseline = "registry", go_modules = [], size_budget = "", tags = [], visibility = None, testonly = False, target_compatible_with = []): - """Publishes pinned files as a draft-only GitHub Release. - - `sbom` is a dx_sbom target uploaded as one more release asset. - `release_tag` defaults to "v0.0.0-dryrun"; `tag_from_head = True` uses the - tag that points at HEAD instead. - `notes` is "commits" (the grouped commit list since the previous tag) or - "none"; `notes_file` is a markdown file used as the release body instead. - `api_compat` and `api_baseline` work as described under "Public API - compatibility" in the README; the tool is apidiff on each of `go_modules` - (workspace-relative directories; empty means the go.mod at the root). - """ + """Publishes pinned files as a draft-only GitHub Release. `sbom` is a dx_sbom target uploaded as one more release asset. `release_tag` defaults to "v0.0.0-dryrun"; `tag_from_head = True` uses the tag that points at HEAD instead. `notes` is "commits" (the grouped commit list since the previous tag) or "none"; `notes_file` is a markdown file used as the release body instead. `api_compat` and `api_baseline` work as described under "Public API compatibility" in the README; the tool is apidiff on each of `go_modules` (workspace-relative directories; empty means the go.mod at the root).""" attrs = deploy_attrs(tags, visibility, testonly, target_compatible_with) if tag_from_head: if release_tag != "": diff --git a/deploy/rules/maven.bzl b/deploy/rules/maven.bzl index 7e1d0b9cd7..c588b4443b 100644 --- a/deploy/rules/maven.bzl +++ b/deploy/rules/maven.bzl @@ -116,11 +116,7 @@ _maven_config = rule( ) def maven_deploy(name, jar, pom, group, artifact = "", version = "", build_mode = "release", sources = None, javadoc = None, sbom = None, api_compat = "fail", api_baseline = "registry", size_budget = "", tags = [], visibility = None, testonly = False, target_compatible_with = []): - """Publishes one jar plus its pom, and optional sources and javadoc jars, as a local-first Maven deployment. - - api_compat and api_baseline work as described under "Public API - compatibility" in the README; the tool is japicmp on the jar. - """ + """Publishes one jar plus its pom, and optional sources and javadoc jars, as a local-first Maven deployment. api_compat and api_baseline work as described under "Public API compatibility" in the README; the tool is japicmp on the jar.""" attrs = deploy_attrs(tags, visibility, testonly, target_compatible_with) group_error = maven_group_error(group) if group_error != "": diff --git a/deploy/rules/native_probe.bzl b/deploy/rules/native_probe.bzl index 1100aac1a4..8b7fc53441 100644 --- a/deploy/rules/native_probe.bzl +++ b/deploy/rules/native_probe.bzl @@ -32,6 +32,6 @@ native_probe_runtime_files = rule( implementation = _runtime_files_impl, doc = "Copies the files of a native_runtime next to the probe package so a wheel ships them.", attrs = { - "runtime": attr.label(mandatory = True, providers = [NativeRuntimeInfo]), + "runtime": attr.label(mandatory = True, providers = [NativeRuntimeInfo], doc = "The native_runtime whose files are copied."), }, ) diff --git a/deploy/rules/npm.bzl b/deploy/rules/npm.bzl index 043c2305f8..0219cbc010 100644 --- a/deploy/rules/npm.bzl +++ b/deploy/rules/npm.bzl @@ -48,11 +48,7 @@ _npm_config = rule( ) def npm_deploy(name, package = "", dist_tag = "latest", srcs = [], registry_url = "https://registry.npmjs.org", access = "public", provenance = "", build_mode = "release", sbom = None, api_compat = "fail", api_baseline = "registry", size_budget = "", tags = [], visibility = None, testonly = False, target_compatible_with = []): - """Packs files into a local npm feed with public or restricted access and a provenance policy. - - api_compat and api_baseline work as described under "Public API - compatibility" in the README; the tool is api-extractor on the types entry. - """ + """Packs files into a local npm feed with public or restricted access and a provenance policy. api_compat and api_baseline work as described under "Public API compatibility" in the README; the tool is api-extractor on the types entry.""" attrs = deploy_attrs(tags, visibility, testonly, target_compatible_with) package, _ = deploy_identity(name, package, "", npm_package_error, npm_package_error) tag_error = npm_tag_error(dist_tag) diff --git a/deploy/rules/nuget.bzl b/deploy/rules/nuget.bzl index 3b7b206d38..b71c609432 100644 --- a/deploy/rules/nuget.bzl +++ b/deploy/rules/nuget.bzl @@ -113,11 +113,7 @@ _nuget_config = rule( ) def nuget_deploy(name, nupkg, package = "", version = "", registry_url = NUGET_DEFAULT_REGISTRY_URL, build_mode = "release", sbom = None, api_compat = "fail", api_baseline = "registry", size_budget = "", tags = [], visibility = None, testonly = False, target_compatible_with = []): - """Publishes one nupkg after checking its nuspec id and version. - - api_compat and api_baseline work as described under "Public API - compatibility" in the README; the tool is Microsoft.DotNet.ApiCompat. - """ + """Publishes one nupkg after checking its nuspec id and version. api_compat and api_baseline work as described under "Public API compatibility" in the README; the tool is Microsoft.DotNet.ApiCompat.""" attrs = deploy_attrs(tags, visibility, testonly, target_compatible_with) pkg, version = deploy_identity(name, package, version, nuget_id_error, nuget_version_error) api_error = api_compat_error("nuget_deploy", api_compat, api_baseline) diff --git a/deploy/rules/octopus.bzl b/deploy/rules/octopus.bzl index 4c7d3090c7..195bce129f 100644 --- a/deploy/rules/octopus.bzl +++ b/deploy/rules/octopus.bzl @@ -166,10 +166,7 @@ _octopus_config = rule( ) def octopus_deploy(name, srcs, project, package = "", channel = "Default", version = "", deploy_to = [], space = "", registry_url = OCTOPUS_DEFAULT_REGISTRY_URL, build_mode = "release", sbom = None, size_budget = "", tags = [], visibility = None, testonly = False, target_compatible_with = []): - """Publishes one `..tar.gz` archive as a local-first Octopus deployment. - - The package id defaults to the target name. An empty version means the launcher reads it from the archive filename. - """ + """Publishes one `..tar.gz` archive as a local-first Octopus deployment. The package id defaults to the target name. An empty version means the launcher reads it from the archive filename.""" attrs = deploy_attrs(tags, visibility, testonly, target_compatible_with) project_error = octopus_project_error(project) if project_error != "": diff --git a/deploy/rules/pypi.bzl b/deploy/rules/pypi.bzl index f41e870002..42562ab23a 100644 --- a/deploy/rules/pypi.bzl +++ b/deploy/rules/pypi.bzl @@ -125,13 +125,7 @@ _pypi_config = rule( ) def pypi_deploy(name, wheel, sdist = None, registry_url = PYPI_DEFAULT_REGISTRY_URL, build_mode = "release", sbom = None, api_compat = "fail", api_baseline = "registry", api_package = "", api_src = "", size_budget = "", tags = [], visibility = None, testonly = False, target_compatible_with = []): - """Publishes one wheel plus an optional sdist as a local-first PyPI deployment. - - api_compat and api_baseline work as described under "Public API - compatibility" in the README; the tool is griffe. api_package is the import - name, which defaults to the distribution name, and api_src the - workspace-relative source directory the git baseline needs. - """ + """Publishes one wheel plus an optional sdist as a local-first PyPI deployment. api_compat and api_baseline work as described under "Public API compatibility" in the README; the tool is griffe. api_package is the import name, which defaults to the distribution name, and api_src the workspace-relative source directory the git baseline needs.""" attrs = deploy_attrs(tags, visibility, testonly, target_compatible_with) name_error = pypi_name_error(name) if name_error != "": diff --git a/families/dotnet/fsharp/rules/defs.bzl b/families/dotnet/fsharp/rules/defs.bzl index 7dac4e26a5..62c90a031c 100644 --- a/families/dotnet/fsharp/rules/defs.bzl +++ b/families/dotnet/fsharp/rules/defs.bzl @@ -92,7 +92,7 @@ def fsharp_test(name, *, srcs = None, visibility = None, **kwargs): fail("fsharp_test //" + native.package_name() + ":" + name + " needs srcs") dx_wrap_test(name, _fsharp_test, _fsharp_forward_test, srcs, visibility = visibility, upstream_kwargs = fsharp_tfm_with_defaults(kwargs), extra_forward_kwargs = _fsharp_context(kwargs), coverage_collector = FSHARP_COVERAGE_COLLECTOR, **kwargs) -def fsharp_bench(name, srcs, deps = None, tags = None, **kwargs): +def fsharp_bench(name, *, srcs, deps = None, tags = None, **kwargs): """An fsharp_test that runs the [] classes in srcs with BenchmarkDotNet and writes dx-bench.json.""" fsharp_test( name = name, diff --git a/generation/codegen.bzl b/generation/codegen.bzl index 5f860138ed..409db74dc2 100644 --- a/generation/codegen.bzl +++ b/generation/codegen.bzl @@ -43,19 +43,7 @@ DX_CODEGEN_PLAN_OUTPUT_GROUP = "dx_codegen_plans" CODEGEN_RUST_EDITION = "2021" def codegen_rust_library_kwargs(name, generated, crate_name, runtime, deps, kwargs): - """Arguments of the rust_library wrapping a generated crate. - - Args: - name: Name of the rust_library. - generated: Label of the target generating the crate sources. - crate_name: Crate name, or None for name. - runtime: Labels of the runtime crates. - deps: Dependencies of the caller, added after the runtime. - kwargs: Caller arguments; they override the defaults, and srcs and deps are added to. - - Returns: - Keyword arguments for rust_library. - """ + """Arguments of the rust_library wrapping a generated crate.""" args = { "crate_name": (crate_name or name).replace("-", "_"), "crate_root": None, diff --git a/java/rules/defs.bzl b/java/rules/defs.bzl index 045629c5f0..b674bf8aec 100644 --- a/java/rules/defs.bzl +++ b/java/rules/defs.bzl @@ -110,13 +110,5 @@ def java_fuzz_test(name, srcs = None, target_class = None, visibility = None, ta jazzer_fuzz(name, java_library, srcs, deps, target_class, visibility, tags, kwargs) def java_bench(name, srcs, deps = [], tags = [], **kwargs): - """Runs the JMH benchmarks in srcs and writes dx-bench.json for dx bench. - - Args: - name: the test target. - srcs: Java sources with @Benchmark methods. - deps: libraries the benchmarks use. - tags: extra tags. dx-bench and manual are added. - **kwargs: passed to the test. - """ + """Runs the JMH benchmarks in srcs and writes dx-bench.json for dx bench.""" jmh_bench(name, java_library, java_jmh_test, srcs, deps, tags, kwargs) diff --git a/java/rules/jmh.bzl b/java/rules/jmh.bzl index d0c845d979..6b25968727 100644 --- a/java/rules/jmh.bzl +++ b/java/rules/jmh.bzl @@ -64,19 +64,17 @@ def _jmh_generated_impl(ctx): _jmh_generated = rule( implementation = _jmh_generated_impl, + doc = "Runs the JMH bytecode generator over a library jar into a source jar and resources.", attrs = { - "lib": attr.label(providers = [JavaInfo], mandatory = True), - "srcjar": attr.output(mandatory = True), - "resources": attr.output(mandatory = True), + "lib": attr.label(providers = [JavaInfo], mandatory = True, doc = "The compiled benchmark library."), + "srcjar": attr.output(mandatory = True, doc = "The generated Java sources."), + "resources": attr.output(mandatory = True, doc = "The generated JMH resources."), "_generator": attr.label(default = _GENERATOR, executable = True, cfg = "exec"), }, ) def jmh_bench_generated(name, library, test, srcs, deps, tags, kwargs, library_kwargs = {}): - """Like jmh_bench for languages whose compiler runs no Java annotation processors. - - The library compiles without the processor, JmhGenerate runs the JMH bytecode generator over its jar, and javac compiles the generated Java. - """ + """Like jmh_bench for languages whose compiler runs no Java annotation processors. The library compiles without the processor, JmhGenerate runs the JMH bytecode generator over its jar, and javac compiles the generated Java.""" library( name = name + "_bin", srcs = srcs, diff --git a/javascript/rules/frameworks.bzl b/javascript/rules/frameworks.bzl index 58f7a510ed..20133f8a19 100644 --- a/javascript/rules/frameworks.bzl +++ b/javascript/rules/frameworks.bzl @@ -94,12 +94,7 @@ def _dx_framework_vite_run(name, out, srcs, config, node_modules, packages, mnem ) def dx_framework_build(name, what, mnemonic, packages, srcs, config, node_modules, package_json = None, public = None, ssr_entry = None, deps = None, visibility = None, tool = _VITE_TOOL, keep_entry_path = False, **kwargs): - """Builds one framework app into a bundled web app tree and an optional SSR tree. - - Creates the private `_dist` build target behind the web app ``. - With `ssr_entry` it also creates `_ssr`, which takes the given visibility. - `tags`, `testonly` and `target_compatible_with` reach every target. - """ + """Builds one framework app into a bundled web app tree and an optional SSR tree. Creates the private `_dist` build target behind the web app ``. With `ssr_entry` it also creates `_ssr`, which takes the given visibility. `tags`, `testonly` and `target_compatible_with` reach every target.""" tags = kwargs.get("tags", []) testonly = kwargs.get("testonly", False) compatible = kwargs.get("target_compatible_with", None) diff --git a/kotlin/rules/defs.bzl b/kotlin/rules/defs.bzl index 1f8184a65e..af9a50842d 100644 --- a/kotlin/rules/defs.bzl +++ b/kotlin/rules/defs.bzl @@ -131,15 +131,7 @@ def kotlin_test(name, srcs = None, visibility = None, **kwargs): ) def kotlin_bench(name, srcs, deps = [], tags = [], **kwargs): - """Runs the JMH benchmarks in Kotlin srcs and writes dx-bench.json for dx bench. - - Args: - name: the test target. - srcs: Kotlin sources with @Benchmark methods. - deps: libraries the benchmarks use. - tags: extra tags. dx-bench and manual are added. - **kwargs: passed to the test. - """ + """Runs the JMH benchmarks in Kotlin srcs and writes dx-bench.json for dx bench.""" kt_javac_options( name = name + "_javac_opts", warn = "off", @@ -149,17 +141,7 @@ def kotlin_bench(name, srcs, deps = [], tags = [], **kwargs): jmh_bench(name, kotlin_library, java_jmh_test, srcs, deps, tags, kwargs, {"javac_opts": ":" + name + "_javac_opts"}) def kotlin_fuzz_test(name, srcs, target_class, deps = None, visibility = None, tags = None, **kwargs): - """A Jazzer fuzz target plus a `_run` runner for `dx fuzz`. - - Args: - name: the fuzz binary; the runner is `_run`. - srcs: Kotlin sources. The target class needs a static `fuzzerTestOneInput`, so use `@JvmStatic` in an object. - target_class: the class Jazzer fuzzes. - deps: libraries the target uses. - visibility: visibility of the binary and the runner. - tags: extra tags. dx-fuzz and manual are added. - **kwargs: `args` and `target_compatible_with` go to the binary, the rest to the library. - """ + """A Jazzer fuzz target plus a `_run` runner for `dx fuzz`.""" kt_javac_options( name = name + "_javac_opts", warn = "off", diff --git a/libs/starlark/fuzz.bzl b/libs/starlark/fuzz.bzl index 8b586abe79..a79a793bf2 100644 --- a/libs/starlark/fuzz.bzl +++ b/libs/starlark/fuzz.bzl @@ -33,16 +33,7 @@ dx_fuzz_binary = rule( ) def dx_fuzz_runner(name, fuzz, engine = "libfuzzer", target = "", harness = None, visibility = None): - """Defines `_run`, the runner `dx fuzz` calls for the fuzz binary `fuzz`. - - Args: - name: the fuzz target; the runner is `_run`. - fuzz: label of the fuzz binary or test. - engine: `libfuzzer`, `jazzer`, `go` or `dotnet`. - target: the Jazzer target class or the Go fuzz function; unused for libfuzzer and dotnet. - harness: label of the .NET harness the `dotnet` engine passes to `fuzz` as `--target_path`. - visibility: visibility of the runner. - """ + """Defines `_run`, the runner `dx fuzz` calls for the fuzz binary `fuzz`.""" sh_binary( name = name + "_run", srcs = [Label("//libs/starlark:fuzz_run.sh")], diff --git a/ocaml/toolchain/opam.bzl b/ocaml/toolchain/opam.bzl index c4c88663a7..b6720d1aa6 100644 --- a/ocaml/toolchain/opam.bzl +++ b/ocaml/toolchain/opam.bzl @@ -87,10 +87,7 @@ def _locked_version(filt): return version def parse_depends(text): - """Returns {package: version} for the depends entries that pin a version. - - Entries limited to tests, docs or development versions are left out. - """ + """Returns {package: version} for the depends entries that pin a version. Entries limited to tests, docs or development versions are left out.""" at = _field(text, "depends:") if at < 0: return {} @@ -131,11 +128,7 @@ def _hex_to_base64(digits): return out def parse_url(text): - """Returns struct(src, sha256, integrity) from the `url` section of an opam file. - - A file with only a sha512 checksum gets an empty sha256 and a - `sha512-` integrity. - """ + """Returns struct(src, sha256, integrity) from the `url` section of an opam file. A file with only a sha512 checksum gets an empty sha256 and a `sha512-` integrity.""" at = _field(text, "url") if at < 0: fail("the opam file has no url section") diff --git a/python/rules/defs.bzl b/python/rules/defs.bzl index dfbac9fed9..5e1679cd67 100644 --- a/python/rules/defs.bzl +++ b/python/rules/defs.bzl @@ -212,9 +212,10 @@ def _srcs_impl(ctx): _py_grpc_srcs = rule( implementation = _srcs_impl, + doc = "Compiles the gRPC services of a proto_library into Python stubs.", attrs = { - "proto": attr.label(mandatory = True, providers = [ProtoInfo]), - "tool": attr.label(mandatory = True, executable = True, cfg = "exec"), + "proto": attr.label(mandatory = True, providers = [ProtoInfo], doc = "The proto_library with the service."), + "tool": attr.label(mandatory = True, executable = True, cfg = "exec", doc = "The protoc binary from grpcio-tools."), "_exec_os": attr.label( default = "//libs/exec_os", cfg = "exec", @@ -224,17 +225,7 @@ _py_grpc_srcs = rule( ) def python_grpc_library(name, proto, py_proto, grpc_tools = "@pypi//grpcio_tools", grpc = "@pypi//grpcio", dep_group = None, **kwargs): - """Compiles the services of proto into _pb2_grpc.py. - - Args: - name: target name of the py_library. - proto: the proto_library with the service. It must sit in the same package. - py_proto: the py_proto_library for the same proto_library. - grpc_tools: label of the grpcio-tools package that provides protoc. - grpc: label of the grpcio package the stubs import. - dep_group: uv project name for the packages, when the hub has several. - **kwargs: forwarded to the py_library, for example visibility. - """ + """Compiles the services of proto into _pb2_grpc.py.""" python_binary( name = name + "_protoc", srcs = ["@rules_dx//python/rules:grpc_protoc.py"], diff --git a/quality/fsc.bzl b/quality/fsc.bzl index 1320d1718b..acce061631 100644 --- a/quality/fsc.bzl +++ b/quality/fsc.bzl @@ -48,10 +48,7 @@ def _targetprofile(tfm): return "--targetprofile:mscorlib" def fsc_warnon_args(nowarn, compiler_options): - """Returns the warnings dx turns on beyond the real build: FS1182, unused values. - - A target that silences 1182 itself through nowarn or compiler_options keeps it off. - """ + """Returns the warnings dx turns on beyond the real build: FS1182, unused values. A target that silences 1182 itself through nowarn or compiler_options keeps it off.""" if "1182" in nowarn or "FS1182" in nowarn: return [] for option in compiler_options: diff --git a/scala/rules/defs.bzl b/scala/rules/defs.bzl index 9540662044..72b7495bfc 100644 --- a/scala/rules/defs.bzl +++ b/scala/rules/defs.bzl @@ -85,27 +85,9 @@ def scala_test(name, srcs = None, visibility = None, **kwargs): def scala_fuzz_test(name, srcs, target_class, deps = None, visibility = None, tags = None, **kwargs): - """A Jazzer fuzz target plus a `_run` runner for `dx fuzz`. - - Args: - name: the fuzz binary; the runner is `_run`. - srcs: Scala sources. A top-level `object` exposes `fuzzerTestOneInput` as a static method. - target_class: the class Jazzer fuzzes. - deps: libraries the target uses. - visibility: visibility of the binary and the runner. - tags: extra tags. dx-fuzz and manual are added. - **kwargs: `args` and `target_compatible_with` go to the binary, the rest to the library. - """ + """A Jazzer fuzz target plus a `_run` runner for `dx fuzz`.""" jazzer_fuzz(name, scala_library, srcs, deps, target_class, visibility, tags, kwargs) def scala_bench(name, srcs, deps = [], tags = [], **kwargs): - """Runs the JMH benchmarks in Scala srcs and writes dx-bench.json for dx bench. - - Args: - name: the test target. - srcs: Scala sources with @Benchmark methods. Benchmark classes must be non-final classes, not objects. - deps: libraries the benchmarks use. - tags: extra tags. dx-bench and manual are added. - **kwargs: passed to the test. - """ + """Runs the JMH benchmarks in Scala srcs and writes dx-bench.json for dx bench.""" jmh_bench_generated(name, scala_library, java_jmh_test, srcs, deps, tags, kwargs)