-
-
Notifications
You must be signed in to change notification settings - Fork 788
Expand file tree
/
Copy pathDiagnosticDescriptors.cs
More file actions
36 lines (32 loc) · 1.9 KB
/
Copy pathDiagnosticDescriptors.cs
File metadata and controls
36 lines (32 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (c) 2019-2026 ReactiveUI and Contributors. All rights reserved.
// ReactiveUI and Contributors licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
using Microsoft.CodeAnalysis;
namespace Refit.Generator;
/// <summary>Diagnostic descriptors reported by the Refit source generator.</summary>
internal static class DiagnosticDescriptors
{
/// <summary>Diagnostic reported when the Refit assembly is not referenced.</summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "RS2008", Justification = "Diagnostic IDs are stable and intentionally not tracked in an analyzer release-tracking file.")]
internal static readonly DiagnosticDescriptor RefitNotReferenced =
new(
"RF002",
"Refit must be referenced",
"Refit is not referenced. Add a reference to Refit.",
Category,
DiagnosticSeverity.Error,
true);
/// <summary>Diagnostic reported when a source-generation-only attribute is used on a method that cannot generate inline.</summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "RS2008", Justification = "Diagnostic IDs are stable and intentionally not tracked in an analyzer release-tracking file.")]
internal static readonly DiagnosticDescriptor SourceGenOnlyAttributeRequiresInlineRequest =
new(
"RF007",
"Attribute requires generated request building",
"Method '{0}' uses [{1}], which is only honored by generated request building, but its request cannot be "
+ "generated inline. Make the method compatible with inline generation or remove the attribute.",
Category,
DiagnosticSeverity.Error,
true);
/// <summary>The diagnostic category for Refit generator diagnostics.</summary>
private const string Category = "Refit";
}