201 references to RazorDiagnosticSeverity
Microsoft.AspNetCore.Razor.Language.UnitTests (43)
CodeGeneration\CodeRenderingContextTest.cs (6)
20
var descriptor = new RazorDiagnosticDescriptor("RZTest", "Test warning for '{0}'",
RazorDiagnosticSeverity
.Warning, warningLevel: 12);
51
var descriptor = new RazorDiagnosticDescriptor("RZAlways", "Always on: '{0}'",
RazorDiagnosticSeverity
.Warning);
80
new RazorDiagnosticDescriptor("RZ0", "Always",
RazorDiagnosticSeverity
.Warning),
83
new RazorDiagnosticDescriptor("RZ11", "Level 11",
RazorDiagnosticSeverity
.Warning, warningLevel: 11),
86
new RazorDiagnosticDescriptor("RZ12", "Level 12",
RazorDiagnosticSeverity
.Warning, warningLevel: 12),
89
new RazorDiagnosticDescriptor("RZ13", "Level 13",
RazorDiagnosticSeverity
.Warning, warningLevel: 13),
DefaultRazorCSharpLoweringPhaseTest.cs (1)
72
new RazorDiagnosticDescriptor("1234", "I am an error.",
RazorDiagnosticSeverity
.Error),
DefaultRazorTagHelperBinderPhaseTest.cs (1)
477
new RazorDiagnosticDescriptor("RZ9999", "Initial test error",
RazorDiagnosticSeverity
.Error),
DirectiveRemovalOptimizationPassTest.cs (1)
88
var expectedDiagnostic = RazorDiagnostic.Create(new RazorDiagnosticDescriptor("RZ9999", "Some diagnostic message.",
RazorDiagnosticSeverity
.Error));
IntegrationTests\ComponentCodeGenerationTestBase.cs (4)
1113
Assert.Equal(
RazorDiagnosticSeverity
.Warning, diagnostics.Severity);
1572
Assert.Equal(
RazorDiagnosticSeverity
.Warning, diagnostics.Severity);
1692
Assert.Equal(
RazorDiagnosticSeverity
.Warning, diagnostics.Severity);
5660
Assert.Equal(
RazorDiagnosticSeverity
.Error, d.Severity);
IntegrationTests\ComponentDiagnosticRazorIntegrationTest.cs (2)
144
Assert.Equal(
RazorDiagnosticSeverity
.Warning, diagnostic.Severity);
164
Assert.Equal(
RazorDiagnosticSeverity
.Warning, diagnostic.Severity);
RazorDiagnosticDescriptorTest.cs (12)
17
var descriptor = new RazorDiagnosticDescriptor("RZ0001", "Hello, World!",
RazorDiagnosticSeverity
.Error);
21
Assert.Equal(
RazorDiagnosticSeverity
.Error, descriptor.Severity);
30
var descriptor = new RazorDiagnosticDescriptor("RZ0001", "Hello, World!",
RazorDiagnosticSeverity
.Warning, warningLevel: 11);
34
Assert.Equal(
RazorDiagnosticSeverity
.Warning, descriptor.Severity);
43
var descriptor1 = new RazorDiagnosticDescriptor("RZ0001", "a!",
RazorDiagnosticSeverity
.Error);
44
var descriptor2 = new RazorDiagnosticDescriptor("RZ0001", "a!",
RazorDiagnosticSeverity
.Error);
57
var descriptor1 = new RazorDiagnosticDescriptor("RZ0001", "a!",
RazorDiagnosticSeverity
.Error);
58
var descriptor2 = new RazorDiagnosticDescriptor("RZ0002", "b!",
RazorDiagnosticSeverity
.Error);
71
var descriptor1 = new RazorDiagnosticDescriptor("RZ0001", "a!",
RazorDiagnosticSeverity
.Error);
72
var descriptor2 = new RazorDiagnosticDescriptor("RZ0001", "a!",
RazorDiagnosticSeverity
.Error);
85
var descriptor1 = new RazorDiagnosticDescriptor("RZ0001", "a!",
RazorDiagnosticSeverity
.Error);
86
var descriptor2 = new RazorDiagnosticDescriptor("RZ0001", "b!",
RazorDiagnosticSeverity
.Error);
RazorDiagnosticTest.cs (16)
16
var descriptor = new RazorDiagnosticDescriptor("RZ0001", "a",
RazorDiagnosticSeverity
.Error);
24
Assert.Equal(
RazorDiagnosticSeverity
.Error, diagnostic.Severity);
32
var descriptor = new RazorDiagnosticDescriptor("RZ0001", "a",
RazorDiagnosticSeverity
.Error);
40
Assert.Equal(
RazorDiagnosticSeverity
.Error, diagnostic.Severity);
48
var descriptor = new RazorDiagnosticDescriptor("RZ0000", "this is an {0}",
RazorDiagnosticSeverity
.Error);
64
var descriptor = new RazorDiagnosticDescriptor("RZ0000", "this is an {0}",
RazorDiagnosticSeverity
.Error);
81
var descriptor = new RazorDiagnosticDescriptor("RZ0000", "this is an error",
RazorDiagnosticSeverity
.Error);
97
var descriptor = new RazorDiagnosticDescriptor("RZ0000", "this is an {0}",
RazorDiagnosticSeverity
.Error);
113
var descriptor = new RazorDiagnosticDescriptor("RZ0000", "this is an {0}",
RazorDiagnosticSeverity
.Error);
130
var descriptor = new RazorDiagnosticDescriptor("RZ0000", "this is an {0}",
RazorDiagnosticSeverity
.Error);
148
var descriptor1 = new RazorDiagnosticDescriptor("RZ0001", "this is an {0}",
RazorDiagnosticSeverity
.Error);
149
var descriptor2 = new RazorDiagnosticDescriptor("RZ0002", "this is an {0}",
RazorDiagnosticSeverity
.Error);
166
var descriptor = new RazorDiagnosticDescriptor("RZ0000", "this is an {0}",
RazorDiagnosticSeverity
.Error);
183
var descriptor = new RazorDiagnosticDescriptor("RZ0000", "this is an {0}",
RazorDiagnosticSeverity
.Error);
201
var descriptor1 = new RazorDiagnosticDescriptor("RZ0001", "this is an {0}",
RazorDiagnosticSeverity
.Error);
202
var descriptor2 = new RazorDiagnosticDescriptor("RZ0002", "this is an {0}",
RazorDiagnosticSeverity
.Error);
Microsoft.CodeAnalysis.Razor.Compiler (147)
CSharp\RazorDiagnosticFactory.cs (8)
40
RazorDiagnosticSeverity
.Error);
47
RazorDiagnosticSeverity
.Error);
55
RazorDiagnosticSeverity
.Error);
63
RazorDiagnosticSeverity
.Error);
71
RazorDiagnosticSeverity
.Error);
79
RazorDiagnosticSeverity
.Error);
87
RazorDiagnosticSeverity
.Error);
95
RazorDiagnosticSeverity
.Error);
Language\Components\ComponentDiagnosticFactory.cs (43)
21
RazorDiagnosticSeverity
.Error);
31
RazorDiagnosticSeverity
.Error);
39
RazorDiagnosticSeverity
.Error);
47
RazorDiagnosticSeverity
.Error);
55
RazorDiagnosticSeverity
.Error);
63
RazorDiagnosticSeverity
.Error);
71
RazorDiagnosticSeverity
.Error);
84
RazorDiagnosticSeverity
.Error);
95
RazorDiagnosticSeverity
.Error);
106
RazorDiagnosticSeverity
.Error);
118
RazorDiagnosticSeverity
.Error);
126
RazorDiagnosticSeverity
.Error);
139
RazorDiagnosticSeverity
.Error);
152
RazorDiagnosticSeverity
.Error);
160
RazorDiagnosticSeverity
.Error);
170
RazorDiagnosticSeverity
.Error);
178
RazorDiagnosticSeverity
.Error);
187
RazorDiagnosticSeverity
.Error);
199
RazorDiagnosticSeverity
.Error);
207
RazorDiagnosticSeverity
.Error);
216
RazorDiagnosticSeverity
.Error);
242
RazorDiagnosticSeverity
.Error);
259
RazorDiagnosticSeverity
.Error);
275
RazorDiagnosticSeverity
.Error);
283
RazorDiagnosticSeverity
.Error);
291
RazorDiagnosticSeverity
.Error);
302
RazorDiagnosticSeverity
.Error);
311
RazorDiagnosticSeverity
.Error);
319
RazorDiagnosticSeverity
.Error);
328
RazorDiagnosticSeverity
.Error);
336
RazorDiagnosticSeverity
.Error);
344
RazorDiagnosticSeverity
.Warning);
352
RazorDiagnosticSeverity
.Error);
360
RazorDiagnosticSeverity
.Error);
372
RazorDiagnosticSeverity
.Error);
380
RazorDiagnosticSeverity
.Error);
389
RazorDiagnosticSeverity
.Error);
397
RazorDiagnosticSeverity
.Error);
405
RazorDiagnosticSeverity
.Error);
413
RazorDiagnosticSeverity
.Error);
423
RazorDiagnosticSeverity
.Warning);
431
RazorDiagnosticSeverity
.Error);
439
RazorDiagnosticSeverity
.Error);
Language\DefaultRazorIntermediateNodeLoweringPhase.cs (1)
2227
=> diagnostics.Any(diagnostic => diagnostic.Severity ==
RazorDiagnosticSeverity
.Error);
Language\RazorDiagnostic.cs (2)
16
public
RazorDiagnosticSeverity
Severity => _descriptor.Severity;
116
var
severity = diagnostic.Severity;
Language\RazorDiagnosticDescriptor.cs (3)
14
public
RazorDiagnosticSeverity
Severity { get; }
23
public RazorDiagnosticDescriptor(string id, string messageFormat,
RazorDiagnosticSeverity
severity)
28
public RazorDiagnosticDescriptor(string id, string messageFormat,
RazorDiagnosticSeverity
severity, int warningLevel)
Language\RazorDiagnosticFactory.cs (80)
20
RazorDiagnosticSeverity
.Error);
34
RazorDiagnosticSeverity
.Error);
42
RazorDiagnosticSeverity
.Error);
50
RazorDiagnosticSeverity
.Error);
58
RazorDiagnosticSeverity
.Error);
66
RazorDiagnosticSeverity
.Error);
74
RazorDiagnosticSeverity
.Error);
82
RazorDiagnosticSeverity
.Error);
90
RazorDiagnosticSeverity
.Error);
98
RazorDiagnosticSeverity
.Error);
106
RazorDiagnosticSeverity
.Error);
114
RazorDiagnosticSeverity
.Error);
122
RazorDiagnosticSeverity
.Error);
130
RazorDiagnosticSeverity
.Error);
138
RazorDiagnosticSeverity
.Error);
146
RazorDiagnosticSeverity
.Error);
154
RazorDiagnosticSeverity
.Error);
162
RazorDiagnosticSeverity
.Error);
170
RazorDiagnosticSeverity
.Error);
178
RazorDiagnosticSeverity
.Error);
186
RazorDiagnosticSeverity
.Error);
194
RazorDiagnosticSeverity
.Error);
202
RazorDiagnosticSeverity
.Error);
210
RazorDiagnosticSeverity
.Error);
218
RazorDiagnosticSeverity
.Error);
226
RazorDiagnosticSeverity
.Error);
234
RazorDiagnosticSeverity
.Error);
242
RazorDiagnosticSeverity
.Error);
250
RazorDiagnosticSeverity
.Error);
258
RazorDiagnosticSeverity
.Error);
266
RazorDiagnosticSeverity
.Error);
274
RazorDiagnosticSeverity
.Error);
282
RazorDiagnosticSeverity
.Error);
290
RazorDiagnosticSeverity
.Error);
298
RazorDiagnosticSeverity
.Error);
306
RazorDiagnosticSeverity
.Error);
314
RazorDiagnosticSeverity
.Error);
322
RazorDiagnosticSeverity
.Error);
330
RazorDiagnosticSeverity
.Error);
338
RazorDiagnosticSeverity
.Error);
346
RazorDiagnosticSeverity
.Error);
354
RazorDiagnosticSeverity
.Error);
362
RazorDiagnosticSeverity
.Error);
370
RazorDiagnosticSeverity
.Error);
378
RazorDiagnosticSeverity
.Error);
386
RazorDiagnosticSeverity
.Warning);
394
RazorDiagnosticSeverity
.Error);
408
RazorDiagnosticSeverity
.Error);
416
RazorDiagnosticSeverity
.Error);
424
RazorDiagnosticSeverity
.Error);
432
RazorDiagnosticSeverity
.Error);
440
RazorDiagnosticSeverity
.Error);
448
RazorDiagnosticSeverity
.Error);
456
RazorDiagnosticSeverity
.Error);
464
RazorDiagnosticSeverity
.Error);
472
RazorDiagnosticSeverity
.Error);
480
RazorDiagnosticSeverity
.Error);
488
RazorDiagnosticSeverity
.Error);
496
RazorDiagnosticSeverity
.Error);
510
RazorDiagnosticSeverity
.Warning);
524
RazorDiagnosticSeverity
.Error);
532
RazorDiagnosticSeverity
.Error);
540
RazorDiagnosticSeverity
.Error);
548
RazorDiagnosticSeverity
.Error);
556
RazorDiagnosticSeverity
.Error);
564
RazorDiagnosticSeverity
.Error);
572
RazorDiagnosticSeverity
.Error);
579
RazorDiagnosticSeverity
.Error);
587
RazorDiagnosticSeverity
.Error);
595
RazorDiagnosticSeverity
.Error);
603
RazorDiagnosticSeverity
.Error);
611
RazorDiagnosticSeverity
.Error);
619
RazorDiagnosticSeverity
.Error);
627
RazorDiagnosticSeverity
.Error);
635
RazorDiagnosticSeverity
.Error);
643
RazorDiagnosticSeverity
.Error);
651
RazorDiagnosticSeverity
.Error);
659
RazorDiagnosticSeverity
.Error);
673
RazorDiagnosticSeverity
.Error);
687
RazorDiagnosticSeverity
.Error);
Language\TagHelperObject`1.cs (1)
19
=> Diagnostics.Any(static d => d.Severity ==
RazorDiagnosticSeverity
.Error);
Mvc\RazorExtensionsDiagnosticFactory.cs (7)
17
RazorDiagnosticSeverity
.Error);
30
RazorDiagnosticSeverity
.Error);
43
RazorDiagnosticSeverity
.Error);
56
RazorDiagnosticSeverity
.Error);
68
RazorDiagnosticSeverity
.Error);
81
RazorDiagnosticSeverity
.Error);
93
RazorDiagnosticSeverity
.Error);
SourceGenerators\Diagnostics\RazorDiagnostics.cs (2)
101
RazorDiagnosticSeverity
.Error => DiagnosticSeverity.Error,
102
RazorDiagnosticSeverity
.Warning => DiagnosticSeverity.Warning,
Microsoft.CodeAnalysis.Razor.Workspaces (5)
CodeActions\Razor\ExtractToCodeBehindCodeActionProvider.cs (1)
77
if (directiveNode.GetDiagnostics().Any(d => d.Severity ==
RazorDiagnosticSeverity
.Error))
CodeActions\Razor\ExtractToCssCodeActionProvider.cs (1)
75
if (markupElement.GetDiagnostics().Any(static d => d.Severity ==
RazorDiagnosticSeverity
.Error))
Diagnostics\RazorDiagnosticHelper.cs (3)
62
internal static LspDiagnosticSeverity ConvertSeverity(
RazorDiagnosticSeverity
severity)
66
RazorDiagnosticSeverity
.Error => LspDiagnosticSeverity.Error,
67
RazorDiagnosticSeverity
.Warning => LspDiagnosticSeverity.Warning,
Microsoft.NET.Sdk.Razor.SourceGenerators.UnitTests (2)
RazorDiagnosticTest.cs (2)
16
var diagnostics = RazorDiagnostic.Create(new RazorDiagnosticDescriptor("RZC1001", "Some message",
RazorDiagnosticSeverity
.Error));
33
var diagnostics = RazorDiagnostic.Create(new RazorDiagnosticDescriptor("RZC1001", "Some message",
RazorDiagnosticSeverity
.Error), span);
Microsoft.VisualStudio.LanguageServices.Razor.UnitTests (2)
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\Diagnostics\RazorDiagnosticHelperTest.cs (2)
40
var severity = RazorDiagnosticHelper.ConvertSeverity(
RazorDiagnosticSeverity
.Error);
53
var severity = RazorDiagnosticHelper.ConvertSeverity(
RazorDiagnosticSeverity
.Warning);
Microsoft.VisualStudioCode.RazorExtension.UnitTests (2)
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\Diagnostics\RazorDiagnosticHelperTest.cs (2)
40
var severity = RazorDiagnosticHelper.ConvertSeverity(
RazorDiagnosticSeverity
.Error);
53
var severity = RazorDiagnosticHelper.ConvertSeverity(
RazorDiagnosticSeverity
.Warning);