Skip to content

Commit 5df30d9

Browse files
chore: upgrade Verify.SourceGenerators and update tests (#1874)
Co-authored-by: Chris Pulman <[email protected]>
1 parent 10bd63a commit 5df30d9

File tree

3 files changed

+33
-13
lines changed

3 files changed

+33
-13
lines changed

Refit.GeneratorTests/Refit.GeneratorTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
2121
<PackageReference Include="System.Collections.Immutable" Version="8.0.0" />
2222
<PackageReference Include="Verify.DiffPlex" Version="3.1.0" />
23-
<PackageReference Include="Verify.SourceGenerators" Version="2.4.3" />
23+
<PackageReference Include="Verify.SourceGenerators" Version="2.5.0" />
2424
<PackageReference Include="Verify.Xunit" Version="26.6.0" />
2525
<PackageReference Include="System.Reactive" Version="6.0.1" />
2626
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
{
22
Diagnostics: [
33
{
4-
Id: RF001,
5-
Title: Refit types must have Refit HTTP method attributes,
4+
Location: /*
5+
6+
void NonRefitMethod();
7+
^^^^^^^^^^^^^^
8+
}
9+
*/
10+
: (16,5)-(16,19),
11+
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,
612
Severity: Warning,
713
WarningLevel: 1,
8-
Location: : (16,5)-(16,19),
9-
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,
10-
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,
11-
Category: Refit
14+
Descriptor: {
15+
Id: RF001,
16+
Title: Refit types must have Refit HTTP method attributes,
17+
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,
18+
Category: Refit,
19+
DefaultSeverity: Warning,
20+
IsEnabledByDefault: true
21+
}
1222
}
1323
]
1424
}
Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
{
22
Diagnostics: [
33
{
4-
Id: RF001,
5-
Title: Refit types must have Refit HTTP method attributes,
4+
Location: /*
5+
6+
void NonRefitMethod<T1, T2, T3, T4, T5>()
7+
^^^^^^^^^^^^^^
8+
where T1 : class
9+
*/
10+
: (21,5)-(21,19),
11+
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,
612
Severity: Warning,
713
WarningLevel: 1,
8-
Location: : (21,5)-(21,19),
9-
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,
10-
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,
11-
Category: Refit
14+
Descriptor: {
15+
Id: RF001,
16+
Title: Refit types must have Refit HTTP method attributes,
17+
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,
18+
Category: Refit,
19+
DefaultSeverity: Warning,
20+
IsEnabledByDefault: true
21+
}
1222
}
1323
]
1424
}

0 commit comments

Comments
 (0)