Gazelle is a Bazel build file generator for Bazel projects. It natively supports Go and protobuf, and it may be extended to support new languages and custom rule sets.
Apache License 2.0
1.21k
stars
382
forks
source link
[Proto] Require space between 'service' and service name in regex matching #1845
Prior to this commit, the regex for determining whether a file had services did not require a space between the word "service" and the service name. This could lead to false alarms, like "message serviceABC". In this commit, we update the regex to only match if there is at least one space between service and the service name.
What type of PR is this?
Bug fix
What package or component does this PR mostly affect?
language/proto
What does this PR do? Why is it needed?
Fixes a bug where the HasServices regex could incorrectly match messages that have "service" at the beginning of its name.
Prior to this commit, the regex for determining whether a file had services did not require a space between the word "service" and the service name. This could lead to false alarms, like "message serviceABC". In this commit, we update the regex to only match if there is at least one space between service and the service name.
What type of PR is this?
Bug fix
What package or component does this PR mostly affect?
language/proto
What does this PR do? Why is it needed?
Fixes a bug where the HasServices regex could incorrectly match messages that have "service" at the beginning of its name.
Which issues(s) does this PR fix?
None, small bug fix
Other notes for review