-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Naming convention for internal static readonly #12819
Copy link
Copy link
Closed
Labels
Area-Maintainers-Documentationspecific to documentation in this repospecific to documentation in this repoIssue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or more
Metadata
Metadata
Assignees
Labels
Area-Maintainers-Documentationspecific to documentation in this repospecific to documentation in this repoIssue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or more
In #11777, the readonly modifier was added to internal static members which raised an issue of our naming convention.
According to StyleCopAnalyzers on CodeFactor, "readonly variables that are not declared private must start with an upper-case letter" otherwise there are violations of the rule SA1304NonPrivateReadonlyFieldsMustBeginWithUpperCaseLetter
Our naming conventions state static fields should start with
s_, however the existing code overwhelmingly uses PascalCase forinternal static readonlymembers.In my view conventions should be descriptive rather than prescriptive, so we should consider making changes to the written naming convention.