Skip to content

Commit

Permalink
chore: upgrade Verify.SourceGenerators and update tests (#1874)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Pulman <[email protected]>
  • Loading branch information
TimothyMakkison and ChrisPulman authored Oct 11, 2024
1 parent 10bd63a commit 5df30d9
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Refit.GeneratorTests/Refit.GeneratorTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageReference Include="System.Collections.Immutable" Version="8.0.0" />
<PackageReference Include="Verify.DiffPlex" Version="3.1.0" />
<PackageReference Include="Verify.SourceGenerators" Version="2.4.3" />
<PackageReference Include="Verify.SourceGenerators" Version="2.5.0" />
<PackageReference Include="Verify.Xunit" Version="26.6.0" />
<PackageReference Include="System.Reactive" Version="6.0.1" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
{
Diagnostics: [
{
Id: RF001,
Title: Refit types must have Refit HTTP method attributes,
Location: /*

void NonRefitMethod();
^^^^^^^^^^^^^^
}
*/
: (16,5)-(16,19),
Message: Method IGeneratedClient.NonRefitMethod either has no Refit HTTP method attribute or you've used something other than a string literal for the 'path' argument,
Severity: Warning,
WarningLevel: 1,
Location: : (16,5)-(16,19),
MessageFormat: Method {0}.{1} either has no Refit HTTP method attribute or you've used something other than a string literal for the 'path' argument,
Message: Method IGeneratedClient.NonRefitMethod either has no Refit HTTP method attribute or you've used something other than a string literal for the 'path' argument,
Category: Refit
Descriptor: {
Id: RF001,
Title: Refit types must have Refit HTTP method attributes,
MessageFormat: Method {0}.{1} either has no Refit HTTP method attribute or you've used something other than a string literal for the 'path' argument,
Category: Refit,
DefaultSeverity: Warning,
IsEnabledByDefault: true
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
{
Diagnostics: [
{
Id: RF001,
Title: Refit types must have Refit HTTP method attributes,
Location: /*

void NonRefitMethod<T1, T2, T3, T4, T5>()
^^^^^^^^^^^^^^
where T1 : class
*/
: (21,5)-(21,19),
Message: Method IGeneratedClient.NonRefitMethod either has no Refit HTTP method attribute or you've used something other than a string literal for the 'path' argument,
Severity: Warning,
WarningLevel: 1,
Location: : (21,5)-(21,19),
MessageFormat: Method {0}.{1} either has no Refit HTTP method attribute or you've used something other than a string literal for the 'path' argument,
Message: Method IGeneratedClient.NonRefitMethod either has no Refit HTTP method attribute or you've used something other than a string literal for the 'path' argument,
Category: Refit
Descriptor: {
Id: RF001,
Title: Refit types must have Refit HTTP method attributes,
MessageFormat: Method {0}.{1} either has no Refit HTTP method attribute or you've used something other than a string literal for the 'path' argument,
Category: Refit,
DefaultSeverity: Warning,
IsEnabledByDefault: true
}
}
]
}

0 comments on commit 5df30d9

Please sign in to comment.