-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
Our coding guidelines the naming convention is to: "Use `PascalCase to name constant local variables and fields." and is common with dotnet repository guidelines.
On the other hand, the style for local constants is mostly camelCase in existing code so we should consider the logic for this part of our coding guidelines.
In #13217 (comment) @rjmholt made a persuasive case we should use camelCase instead of PascalCase for local constants:
My thinking is that that's only for global constants (which behave most like value macros), rather than local constant variables (which can hold references and for which
constindicates just immutability rather than referential transparency)
If we used camelCase for local constants this would be a violation of SA1303ConstFieldNamesMustBeginWithUpperCaseLetter but there is an open issue as to whether the rule should apply to local constants as well as fields.