Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,20 @@ dotnet_diagnostic.CA2248.severity = warning
# RS0041: Do not use 'Obsolete' attribute
dotnet_diagnostic.RS0041.severity = none

# RS0051-RS0061: Internal APIs
dotnet_diagnostic.RS0051.severity = warning
Comment thread
Evangelink marked this conversation as resolved.
Comment thread
Evangelink marked this conversation as resolved.
dotnet_diagnostic.RS0052.severity = warning
dotnet_diagnostic.RS0053.severity = warning
dotnet_diagnostic.RS0054.severity = warning
dotnet_diagnostic.RS0055.severity = warning
dotnet_diagnostic.RS0056.severity = warning
## Do not use oblivious types
dotnet_diagnostic.RS0057.severity = none
dotnet_diagnostic.RS0058.severity = warning
dotnet_diagnostic.RS0059.severity = warning
dotnet_diagnostic.RS0060.severity = warning
dotnet_diagnostic.RS0061.severity = warning

# Disabled due to bug https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3687
# SA1010: Opening square brackets should be spaced correctly
dotnet_diagnostic.SA1010.severity = none
Expand Down Expand Up @@ -844,3 +858,31 @@ resharper_replace_conditional_expression_with_null_coalescing_highlighting = war

# Redundant cast
resharper_redundant_cast_highlighting = warning

# The internal API analyzers (RS0051-RS0061) must not track generated code.
# Generated files - BuildInfo.cs (version-stamped constants that differ per build,
# e.g. "1.0.0-ci" vs "2.4.0-dev"), RESX-generated resource accessors, and *.g.cs
# content-file sources - are implementation details, not a stable API surface.
[*.g.cs]
dotnet_diagnostic.RS0051.severity = none
dotnet_diagnostic.RS0052.severity = none
dotnet_diagnostic.RS0053.severity = none
dotnet_diagnostic.RS0054.severity = none
dotnet_diagnostic.RS0055.severity = none
dotnet_diagnostic.RS0056.severity = none
dotnet_diagnostic.RS0058.severity = none
dotnet_diagnostic.RS0059.severity = none
dotnet_diagnostic.RS0060.severity = none
dotnet_diagnostic.RS0061.severity = none

[artifacts/obj/**/*.cs]
dotnet_diagnostic.RS0051.severity = none
dotnet_diagnostic.RS0052.severity = none
dotnet_diagnostic.RS0053.severity = none
dotnet_diagnostic.RS0054.severity = none
dotnet_diagnostic.RS0055.severity = none
dotnet_diagnostic.RS0056.severity = none
dotnet_diagnostic.RS0058.severity = none
dotnet_diagnostic.RS0059.severity = none
dotnet_diagnostic.RS0060.severity = none
dotnet_diagnostic.RS0061.severity = none
13 changes: 7 additions & 6 deletions eng/mark-shipped.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
Set-StrictMode -version 2.0
$ErrorActionPreference = "Stop"

function Set-AsShipped([Parameter(Mandatory)][string]$Directory) {
$shippedFilePath = "$Directory/PublicAPI.Shipped.txt"
function Set-AsShipped([Parameter(Mandatory)][string]$Directory, [Parameter(Mandatory)][string]$Prefix) {
$shippedFilePath = "$Directory/$Prefix.Shipped.txt"
[array]$shipped = Get-Content $shippedFilePath -Encoding utf8
if ($null -eq $shipped) {
$shipped = @()
}

$unshippedFilePath = "$Directory/PublicAPI.Unshipped.txt"
$unshippedFilePath = "$Directory/$Prefix.Unshipped.txt"
[array]$unshipped = Get-Content $unshippedFilePath -Encoding utf8
$removed = @()
$removedPrefix = "*REMOVED*";
Write-Host "Processing $Directory"
Write-Host "Processing $shippedFilePath"

foreach ($item in $unshipped) {
if ($item.Length -gt 0) {
Expand All @@ -32,7 +32,8 @@ function Set-AsShipped([Parameter(Mandatory)][string]$Directory) {
"#nullable enable" | Out-File $unshippedFilePath -Encoding utf8
}

foreach ($file in Get-ChildItem "$PSScriptRoot\..\src" -Recurse -Include "PublicApi.Shipped.txt") {
foreach ($file in Get-ChildItem "$PSScriptRoot\..\src" -Recurse -Include "PublicAPI.Shipped.txt", "InternalAPI.Shipped.txt") {
$Directory = Split-Path -parent $file
Set-AsShipped $Directory
$Prefix = (Split-Path -Leaf $file) -replace '\.Shipped\.txt$', ''
Set-AsShipped $Directory $Prefix
}
477 changes: 477 additions & 0 deletions src/Adapter/MSTest.TestAdapter/InternalAPI/InternalAPI.Shipped.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Comment thread
Evangelink marked this conversation as resolved.
Comment thread
Evangelink marked this conversation as resolved.
121 changes: 121 additions & 0 deletions src/Adapter/MSTest.TestAdapter/InternalAPI/uwp/InternalAPI.Shipped.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
4 changes: 4 additions & 0 deletions src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,12 @@
<AdditionalFiles Include="BannedSymbols.txt" />
<AdditionalFiles Include="PublicAPI\uwp\PublicAPI.Shipped.txt" Condition=" '$(TargetFramework)' == '$(UwpMinimum)' OR '$(TargetFramework)' == '$(ModernUwpMinimum)' " />
<AdditionalFiles Include="PublicAPI\uwp\PublicAPI.Unshipped.txt" Condition=" '$(TargetFramework)' == '$(UwpMinimum)' OR '$(TargetFramework)' == '$(ModernUwpMinimum)' " />
<AdditionalFiles Include="InternalAPI\uwp\InternalAPI.Shipped.txt" Condition=" '$(TargetFramework)' == '$(UwpMinimum)' OR '$(TargetFramework)' == '$(ModernUwpMinimum)' " />
<AdditionalFiles Include="InternalAPI\uwp\InternalAPI.Unshipped.txt" Condition=" '$(TargetFramework)' == '$(UwpMinimum)' OR '$(TargetFramework)' == '$(ModernUwpMinimum)' " />
<AdditionalFiles Include="PublicAPI\PublicAPI.Shipped.txt" Condition=" '$(TargetFramework)' != '$(UwpMinimum)' AND '$(TargetFramework)' != '$(ModernUwpMinimum)' " />
<AdditionalFiles Include="PublicAPI\PublicAPI.Unshipped.txt" Condition=" '$(TargetFramework)' != '$(UwpMinimum)' AND '$(TargetFramework)' != '$(ModernUwpMinimum)' " />
<AdditionalFiles Include="InternalAPI\InternalAPI.Shipped.txt" Condition=" '$(TargetFramework)' != '$(UwpMinimum)' AND '$(TargetFramework)' != '$(ModernUwpMinimum)' " />
<AdditionalFiles Include="InternalAPI\InternalAPI.Unshipped.txt" Condition=" '$(TargetFramework)' != '$(UwpMinimum)' AND '$(TargetFramework)' != '$(ModernUwpMinimum)' " />
</ItemGroup>

<ItemGroup>
Expand Down
Loading