go: Support benchmarks named "Benchmark" (#35167)

The regular expression for benchmarks was enforcing using a suffix
(e.g., `BenchmarkFoo`), but `Benchmark` is a valid benchmark name, just
as `Test` is a valid test name, and `Fuzz` is a valid fuzz test name.

Release Notes:

- Add support for running Go benchmarks named "Benchmark"
This commit is contained in:
Robert Fratto
2025-07-28 10:40:46 +00:00
committed by GitHub
parent 45b3af713e
commit 2566acc2e7
+1 -1
View File
@@ -69,7 +69,7 @@
(
(
(function_declaration name: (_) @run @_name
(#match? @_name "^Benchmark.+"))
(#match? @_name "^Benchmark.*"))
) @_
(#set! tag go-benchmark)
)