29 references to ContractsCheckAnalyzer
Microsoft.ML.CodeAnalyzer.Tests (28)
Code\ContractsCheckTest.cs (28)
13
Microsoft.ML.InternalCodeAnalyzer.
ContractsCheckAnalyzer
,
30
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.NameofDiagnostic.Rule).WithLocation(basis + 8, 46).WithArguments("CheckParam", "paramName", "\"p\""),
31
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.NameofDiagnostic.Rule).WithLocation(basis + 9, 46).WithArguments("CheckParam", "paramName", "nameof(p) + nameof(p)"),
32
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.NameofDiagnostic.Rule).WithLocation(basis + 11, 28).WithArguments("CheckValue", "paramName", "\"p\""),
33
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.NameofDiagnostic.Rule).WithLocation(basis + 13, 39).WithArguments("CheckUserArg", "name", "\"foo\""),
34
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.ExceptionDiagnostic.Rule).WithLocation(basis + 15, 13).WithArguments("Except"),
35
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.ExceptionDiagnostic.Rule).WithLocation(basis + 16, 13).WithArguments("ExceptParam"),
36
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.NameofDiagnostic.Rule).WithLocation(basis + 22, 39).WithArguments("ExceptParam", "paramName", "\"env\""),
37
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.SimpleMessageDiagnostic.Rule).WithLocation(basis + 24, 29).WithArguments("Check", "$\"Hello {foo} is cool\""),
38
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.SimpleMessageDiagnostic.Rule).WithLocation(basis + 28, 29).WithArguments("Check", "string.Format(\"Hello {0} is cool\", foo)"),
39
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.SimpleMessageDiagnostic.Rule).WithLocation(basis + 32, 35).WithArguments("Check", "\"Less fine: \" + env.GetType().Name"),
40
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.NameofDiagnostic.Rule).WithLocation(basis + 34, 17).WithArguments("CheckUserArg", "name", "\"p\""),
41
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.DecodeMessageWithLoadContextDiagnostic.Rule).WithLocation(basis + 39, 41).WithArguments("CheckDecode", "\"This message is suspicious\""),
116
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.ExceptionDiagnostic.Rule).WithLocation(9, 43).WithArguments("ExceptParam"),
117
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.NameofDiagnostic.Rule).WithLocation(9, 65).WithArguments("ExceptParam", "paramName", "\"yuck\""),
118
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.NameofDiagnostic.Rule).WithLocation(13, 39).WithArguments("CheckValue", "paramName", "\"str\""),
119
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.NameofDiagnostic.Rule).WithLocation(14, 66).WithArguments("CheckUserArg", "name", "\"Foo\""),
120
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.NameofDiagnostic.Rule).WithLocation(15, 57).WithArguments("CheckUserArg", "name", "\"Bar\""),
121
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.NameofDiagnostic.Rule).WithLocation(16, 57).WithArguments("CheckUserArg", "name", "\"A\""),
122
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.NameofDiagnostic.Rule).WithLocation(17, 52).WithArguments("ExceptParam", "paramName", "\"Bar\""),
123
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.NameofDiagnostic.Rule).WithLocation(20, 17).WithArguments("CheckParam", "paramName", "\"isFive\""),
124
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.NameofDiagnostic.Rule).WithLocation(21, 49).WithArguments("CheckValue", "paramName", "\"Y\""),
125
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.NameofDiagnostic.Rule).WithLocation(22, 52).WithArguments("ExceptParam", "paramName", "\"tom\""),
126
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.NameofDiagnostic.Rule).WithLocation(23, 39).WithArguments("CheckValue", "paramName", "\"noMatch\""),
127
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.NameofDiagnostic.Rule).WithLocation(24, 53).WithArguments("CheckUserArg", "name", "\"chumble\""),
128
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.NameofDiagnostic.Rule).WithLocation(25, 53).WithArguments("CheckUserArg", "name", "\"sp\""),
147
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.ExceptionDiagnostic.Rule).WithLocation(9, 43).WithArguments("ExceptParam"),
148
VerifyCS.Diagnostic(
ContractsCheckAnalyzer
.NameofDiagnostic.Rule).WithLocation(23, 39).WithArguments("CheckValue", "paramName", "\"noMatch\""),
Microsoft.ML.InternalCodeAnalyzer (1)
ContractsCheckNameofFixProvider.cs (1)
27
private string Id =>
ContractsCheckAnalyzer
.NameofDiagnostic.Id;