36 references to NameAnalyzer
Microsoft.ML.CodeAnalyzer.Tests (30)
Code\NameTest.cs (30)
9
Microsoft.ML.InternalCodeAnalyzer.
NameAnalyzer
,
20
VerifyCS.Diagnostic(
NameAnalyzer
.PrivateFieldName.Rule).WithLocation(6, 21).WithArguments("foo"),
21
VerifyCS.Diagnostic(
NameAnalyzer
.PrivateFieldName.Rule).WithLocation(8, 24).WithArguments("_Bubba"),
22
VerifyCS.Diagnostic(
NameAnalyzer
.PrivateFieldName.Rule).WithLocation(9, 22).WithArguments("_shouldParseHTML"),
23
VerifyCS.Diagnostic(
NameAnalyzer
.PrivateFieldName.Rule).WithLocation(12, 23).WithArguments("BillyClub"),
24
VerifyCS.Diagnostic(
NameAnalyzer
.PrivateFieldName.Rule).WithLocation(14, 30).WithArguments("bob"),
25
VerifyCS.Diagnostic(
NameAnalyzer
.PrivateFieldName.Rule).WithLocation(15, 30).WithArguments("CHAZ"),
26
VerifyCS.Diagnostic(
NameAnalyzer
.PrivateFieldName.Rule).WithLocation(18, 21).WithArguments("_liveFromNYC"),
27
VerifyCS.Diagnostic(
NameAnalyzer
.PrivateFieldName.Rule).WithLocation(20, 28).WithArguments("nice"),
60
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(7, 11).WithArguments("CLASS"),
61
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(9, 20).WithArguments("alice"),
62
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(10, 21).WithArguments("_bob"),
63
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(11, 22).WithArguments("_chaz"),
64
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(12, 30).WithArguments("emily"),
65
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(12, 37).WithArguments("_francis"),
66
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(17, 21).WithArguments("this_is_not_python"),
67
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(18, 21).WithArguments("thisIsNotJava"),
68
VerifyCS.Diagnostic(
NameAnalyzer
.PrivateFieldName.Rule).WithLocation(22, 30).WithArguments("BadEvent"),
69
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(23, 29).WithArguments("bad_event"),
70
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(26, 30).WithArguments("_badEv"),
71
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(28, 29).WithArguments("one"),
72
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(28, 39).WithArguments("three"),
73
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(29, 22).WithArguments("enumb"),
74
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(29, 35).WithArguments("Two_Two"),
75
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(29, 44).WithArguments("_three"),
76
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(31, 25).WithArguments("_m2"),
77
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(38, 12).WithArguments("marco"),
78
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(38, 31).WithArguments("polo"),
152
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(7, 11).WithArguments("CLASS"),
153
VerifyCS.Diagnostic(
NameAnalyzer
.GeneralName.Rule).WithLocation(13, 21).WithArguments("masterBlaster"),
Microsoft.ML.InternalCodeAnalyzer (6)
NameFixProvider.cs (4)
35
NameAnalyzer
.PrivateFieldName.Id,
NameAnalyzer
.GeneralName.Id,
53
string originalName = diagnostic.Properties[
NameAnalyzer
.NameProperty];
54
string desiredNameStr = diagnostic.Properties[
NameAnalyzer
.DesiredNameProperty];
ParameterVariableNameAnalyzer.cs (1)
59
context.ReportDiagnostic(
NameAnalyzer
.CreateDiagnostic(Rule, identifier, NameType.CamelCased, type));
TypeParamNameAnalyzer.cs (1)
46
context.ReportDiagnostic(
NameAnalyzer
.CreateDiagnostic(Rule, identifier, NameType.TPascalCased));