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 06:40:46 -04:00 committed by GitHub
parent 45b3af713e
commit 2566acc2e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -69,7 +69,7 @@
(
(
(function_declaration name: (_) @run @_name
(#match? @_name "^Benchmark.+"))
(#match? @_name "^Benchmark.*"))
) @_
(#set! tag go-benchmark)
)