You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(rules): evaluate method synonyms on word boundaries (#1643)
* fix(rules): evaluate method synonyms on word boundaries
The synonyms rules in AIP-131, AIP-133, and AIP-134 were incorrectly
flagging method names like "ReadyPackage", "ReadingRoom", "PosterBoy",
or "MakerSpace" because they only checked if the name started with
the synonym prefix ("Read", "Post", "Make").
This change introduces a shared helper utils.HasWordBoundaryPrefix
in rules/internal/utils/casing.go and uses it across AIP-131, AIP-133,
and AIP-134, detecting word boundaries by checking if the character
immediately following the prefix is uppercase (indicating a new word
in UpperCamelCase) or if the identifier equals the prefix.
Fixes b/555805873
* Apply suggestion from @gemini-code-assist[bot]
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
0 commit comments