Skip to content

Commit

Permalink
.NET 8 preparation
Browse files Browse the repository at this point in the history
- Remove ExcludeByAttribute as duplicating the defaults.
- Fix code analysis warning identified in #1808.
  • Loading branch information
martincostello committed Jul 13, 2023
1 parent bfaa472 commit 1a7e403
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
<CollectCoverage Condition=" '$(WEBSITE_URL)' == '' ">true</CollectCoverage>
<CoverletOutputFormat>cobertura,json</CoverletOutputFormat>
<Exclude>[AspNet.Security.OAuth*]*,[Refit*]*,[xunit.*]*</Exclude>
<ExcludeByAttribute>System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute</ExcludeByAttribute>
<Threshold>69</Threshold>
</PropertyGroup>
</Project>
4 changes: 2 additions & 2 deletions src/LondonTravel.Site/Swagger/ExampleFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ internal static IOpenApiAny FormatAsJson(object? examples, JsonSerializerOptions
/// <typeparam name="T">The type of the attribute(s) to find.</typeparam>
/// <param name="apiDescription">The API description.</param>
/// <returns>
/// An <see cref="IList{T}"/> containing any found attributes of type <typeparamref name="T"/>.
/// An array containing any found attributes of type <typeparamref name="T"/>.
/// </returns>
private static IList<T> GetAttributes<T>(ApiDescription apiDescription)
private static T[] GetAttributes<T>(ApiDescription apiDescription)
where T : Attribute
{
IEnumerable<T> attributes = Enumerable.Empty<T>();
Expand Down

0 comments on commit 1a7e403

Please sign in to comment.