Skip to content

Commit

Permalink
FRC-0042 Method name can start with underscore (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
geoff-vball authored Dec 15, 2022
1 parent 07947c6 commit 933ae50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builtin/frc_0042.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ func validateMethodName(name string) error {
return xerrors.Errorf("empty name string")
}

if !unicode.IsUpper(rune(name[0])) {
return xerrors.Errorf("Method name first letter must be uppercase, method name: %s", name)
if !(unicode.IsUpper(rune(name[0])) || name[0] == "_"[0]) {
return xerrors.Errorf("Method name first letter must be uppercase or underscore, method name: %s", name)
}

for _, c := range name {
Expand Down

0 comments on commit 933ae50

Please sign in to comment.