Skip to content

Commit 8915226

Browse files
author
Martin Taillefer
committed
Add experimental diagnostics ids
1 parent 5546e37 commit 8915226

84 files changed

Lines changed: 207 additions & 337 deletions

File tree

Some content is hidden

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

Directory.Build.targets

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@
3535
<!-- Prevent analyzer crashes from stopping things -->
3636
<NoWarn>$(NoWarn);AD0001</NoWarn>
3737

38-
<!-- R9A029 is for customers, not for this repo -->
39-
<NoWarn>$(NoWarn);R9A029</NoWarn>
40-
38+
<!-- Experimental warnings are for customers, not for this repo -->
39+
<NoWarn>$(NoWarn);EXTEXP0001;EXTEXP0002;EXTEXP0003;EXTEXP0004;EXTEXP0005;;EXTEXP0006;EXTEXP0007;EXTEXP0008;EXTEXP0009;EXTEXP0010;EXTEXP0011</NoWarn>
4140

4241
<!-- NU5104: A stable release of a package should not have a prerelease dependency -->
4342
<NoWarn>$(NoWarn);NU5104</NoWarn>

eng/MSBuild/Shared.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<ItemGroup>
3-
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\Shared\WarningDefinitions.cs" LinkBase="Shared" />
3+
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\Shared\DiagnosticIds\*.cs" LinkBase="Shared\DiagnosticIds" />
44
</ItemGroup>
55

66
<ItemGroup Condition="'$(InjectSharedThrow)' == 'true'">

src/Analyzers/Microsoft.Extensions.ExtraAnalyzers/Common/DiagDescriptors.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,7 @@ internal static class DiagDescriptors
101101
helpLinkUri: "https://TODO/r9a022",
102102
isEnabledByDefault: true);
103103

104-
// R9A023..R9A028 retired
105-
106-
public static DiagnosticDescriptor UsingExperimentalApi { get; } = new(
107-
id: "R9A029",
108-
messageFormat: Resources.UsingExperimentalApiMessage,
109-
title: Resources.UsingExperimentalApiTitle,
110-
category: Reliability,
111-
description: Resources.UsingExperimentalApiDescription,
112-
defaultSeverity: DiagnosticSeverity.Warning,
113-
helpLinkUri: "https://TODO/r9a029",
114-
isEnabledByDefault: true);
104+
// R9A023..R9A029 retired
115105

116106
public static DiagnosticDescriptor StartsEndsWith { get; } = new(
117107
id: "R9A030",

src/Analyzers/Microsoft.Extensions.ExtraAnalyzers/Common/Resources.Designer.cs

Lines changed: 0 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Analyzers/Microsoft.Extensions.ExtraAnalyzers/Common/Resources.resx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,6 @@
180180
<data name="SequentialFixAllInSolution" xml:space="preserve">
181181
<value>Apply code fix for all issues in current solution</value>
182182
</data>
183-
<data name="UsingExperimentalApiDescription" xml:space="preserve">
184-
<value>Indicates that code is depending on an experimental API</value>
185-
</data>
186-
<data name="UsingExperimentalApiTitle" xml:space="preserve">
187-
<value>Using experimental API</value>
188-
</data>
189-
<data name="UsingExperimentalApiMessage" xml:space="preserve">
190-
<value>'{0}' is experimental and is subject to change without notice</value>
191-
</data>
192183
<data name="StartsEndsWithDescription" xml:space="preserve">
193184
<value>When checking for a single character, prefer the character overloads of 'String.StartsWith' and 'String.EndsWith' for improved performance</value>
194185
</data>

src/Analyzers/Microsoft.Extensions.ExtraAnalyzers/Common/UsingExperimentalApiAnalyzer.cs

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/Analyzers/Microsoft.Extensions.ExtraAnalyzers/Microsoft.Extensions.ExtraAnalyzers.Roslyn3.8/Microsoft.Extensions.ExtraAnalyzers.Roslyn3.8.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<PropertyGroup>
77
<Stage>normal</Stage>
8-
<MinCodeCoverage>89</MinCodeCoverage>
8+
<MinCodeCoverage>87</MinCodeCoverage>
99
<MinMutationScore>n/a</MinMutationScore>
1010
</PropertyGroup>
1111

src/Analyzers/Microsoft.Extensions.ExtraAnalyzers/Microsoft.Extensions.ExtraAnalyzers.Roslyn4.0/Microsoft.Extensions.ExtraAnalyzers.Roslyn4.0.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<PropertyGroup>
88
<Stage>normal</Stage>
9-
<MinCodeCoverage>89</MinCodeCoverage>
9+
<MinCodeCoverage>87</MinCodeCoverage>
1010
<MinMutationScore>87</MinMutationScore>
1111
</PropertyGroup>
1212

src/Libraries/Microsoft.AspNetCore.Telemetry.Middleware/Logging/LoggingOptions.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using Microsoft.Extensions.Compliance.Classification;
99
using Microsoft.Extensions.Http.Telemetry;
1010
using Microsoft.Shared.Data.Validation;
11+
using Microsoft.Shared.DiagnosticIds;
1112

1213
namespace Microsoft.AspNetCore.Telemetry;
1314

@@ -67,7 +68,7 @@ public class LoggingOptions
6768
/// <value>
6869
/// The default value is <see cref="HttpRouteParameterRedactionMode.Strict"/>.
6970
/// </value>
70-
[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)]
71+
[Experimental(diagnosticId: Experiments.Telemetry, UrlFormat = Experiments.UrlFormat)]
7172
public HttpRouteParameterRedactionMode RequestPathParameterRedactionMode { get; set; } = DefaultPathParameterRedactionMode;
7273

7374
/// <summary>
@@ -208,7 +209,7 @@ public class LoggingOptions
208209
/// };
209210
/// </code>
210211
/// </example>
211-
[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)]
212+
[Experimental(diagnosticId: Experiments.Telemetry, UrlFormat = Experiments.UrlFormat)]
212213
[Required]
213214
[SuppressMessage("Usage", "CA2227:Collection properties should be read only",
214215
Justification = "Options pattern.")]

src/Libraries/Microsoft.AspNetCore.Telemetry/Enrichment.RequestHeaders/RequestHeadersLogEnricherOptions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.ComponentModel.DataAnnotations;
66
using System.Diagnostics.CodeAnalysis;
77
using Microsoft.Extensions.Compliance.Classification;
8+
using Microsoft.Shared.DiagnosticIds;
89

910
namespace Microsoft.AspNetCore.Telemetry;
1011

@@ -20,7 +21,7 @@ public class RequestHeadersLogEnricherOptions
2021
/// Default value is an empty dictionary.
2122
/// </remarks>
2223
[Required]
23-
[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)]
24+
[Experimental(diagnosticId: Experiments.Telemetry, UrlFormat = Experiments.UrlFormat)]
2425
#pragma warning disable CA2227 // Collection properties should be read only
2526
public IDictionary<string, DataClassification> HeadersDataClasses { get; set; } = new Dictionary<string, DataClassification>();
2627
#pragma warning restore CA2227 // Collection properties should be read only

0 commit comments

Comments
 (0)