Skip to content

Commit b9731ef

Browse files
committed
fixup! Use Microsoft.CodeAnalysis.PublicApiAnalyzers to track public API surface
1 parent 54883a9 commit b9731ef

File tree

238 files changed

+3636
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+3636
-4
lines changed

eng/ApiCompatibility/PublicApiAnalyzer.props

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22

33
<PropertyGroup Condition="'$(UsePublicApiAnalyzers)' == 'true'">
44
<!-- https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/Microsoft.CodeAnalysis.PublicApiAnalyzers.md -->
5-
<WarningsAsErrors>$(WarningsAsErrors);RS0016;RS0017;RS0022;RS0024;RS0025;RS0026;RS0027;RS0036;RS0037</WarningsAsErrors>
5+
<WarningsAsErrors>$(WarningsAsErrors);RS0016;RS0017;RS0022;RS0024;RS0025;RS0036;RS0037;RS0041;RS0048</WarningsAsErrors>
6+
7+
<!--
8+
TODO: Enable the following:
9+
* RS0026: Symbol 'XYZ' violates the backcompat requirement: 'Do not add multiple overloads with optional parameters'.
10+
https://github.com/dotnet/extensions/issues/4167
11+
12+
* RS0027: 'XYZ' violates the backcompat requirement: 'API with optional parameter(s) should have the most parameters amongst its public overloads'.
13+
https://github.com/dotnet/extensions/issues/4168
14+
-->
615
</PropertyGroup>
716

817
</Project>

eng/ApiCompatibility/PublicApiAnalyzer.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
77
</PackageReference>
88

9-
<AdditionalFiles Include="$(ProjectDir)PublicAPI.Shipped.txt" />
10-
<AdditionalFiles Include="$(ProjectDir)PublicAPI.Unshipped.txt" />
9+
<AdditionalFiles Include="$(ProjectDir)PublicAPI/$(TargetFramework)/PublicAPI.Shipped.txt" />
10+
<AdditionalFiles Include="$(ProjectDir)PublicAPI/$(TargetFramework)/PublicAPI.Unshipped.txt" />
1111
</ItemGroup>
1212

1313
</Project>

0 commit comments

Comments
 (0)