-
-
Notifications
You must be signed in to change notification settings - Fork 746
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move diagnostics to dedicated class (#1842)
Co-authored-by: Chris Pulman <chris.pulman@yahoo.com>
- Loading branch information
1 parent
fd0dd65
commit 1869ca6
Showing
3 changed files
with
32 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using Microsoft.CodeAnalysis; | ||
|
||
namespace Refit.Generator; | ||
|
||
internal static class DiagnosticDescriptors | ||
{ | ||
#pragma warning disable RS2008 // Enable analyzer release tracking | ||
public static readonly DiagnosticDescriptor InvalidRefitMember = | ||
new( | ||
"RF001", | ||
"Refit types must have Refit HTTP method attributes", | ||
"Method {0}.{1} either has no Refit HTTP method attribute or you've used something other than a string literal for the 'path' argument", | ||
"Refit", | ||
DiagnosticSeverity.Warning, | ||
true | ||
); | ||
|
||
public static readonly DiagnosticDescriptor RefitNotReferenced = | ||
new( | ||
"RF002", | ||
"Refit must be referenced", | ||
"Refit is not referenced. Add a reference to Refit.", | ||
"Refit", | ||
DiagnosticSeverity.Error, | ||
true | ||
); | ||
#pragma warning restore RS2008 // Enable analyzer release tracking | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters