Skip to content
This repository was archived by the owner on Jul 12, 2022. It is now read-only.

Commit 4c25b8e

Browse files
author
Lakshmi Priya Sekar
committed
Add rename rule for 'm_'
1 parent bf5d9ed commit 4c25b8e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Microsoft.DotNet.CodeFormatting/Rules/HasUnderScoreInPrivateFieldNamesFormattingRule.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ private async Task<Solution> RenameFields(Solution solution, DocumentId document
8787
private static string GetNewSymbolName(ISymbol symbol)
8888
{
8989
var symbolName = symbol.Name.TrimStart('_');
90+
if (symbolName.StartsWith("m_", StringComparison.OrdinalIgnoreCase)) symbolName = symbolName.Remove(0, 2);
9091
if (symbol.IsStatic)
9192
{
9293
// Check for ThreadStatic private fields.

0 commit comments

Comments
 (0)