Skip to content

Commit ce1e7b2

Browse files
More code analysis clean up
1 parent 5cbb890 commit ce1e7b2

File tree

40 files changed

+94
-33
lines changed

40 files changed

+94
-33
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ csharp_space_between_method_declaration_parameter_list_parentheses = true
9090
csharp_space_between_method_call_parameter_list_parentheses = true
9191
csharp_space_between_parentheses = control_flow_statements, expressions
9292

93+
# primary construcrtors
94+
csharp_style_prefer_primary_constructors = false:none
95+
9396
# style code suppressions
9497
dotnet_diagnostic.SA1002.severity = none
9598
dotnet_diagnostic.SA1003.severity = none

src/Abstractions/src/Asp.Versioning.Abstractions/netstandard2.0/FormatWriter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ internal FormatWriter(
4545

4646
public bool Succeeded { get; private set; }
4747

48-
public int Written => totalWritten;
48+
public readonly int Written => totalWritten;
4949

5050
public void Write( in FormatToken token )
5151
{

src/Abstractions/test/Asp.Versioning.Abstractions.Tests/ApiVersionTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Copyright (c) .NET Foundation and contributors. All rights reserved.
22

3+
//// Ignore Spelling: DX
4+
35
namespace Asp.Versioning;
46

57
public partial class ApiVersionTest

src/AspNet/Acceptance/Asp.Versioning.WebApi.Acceptance.Tests/Http/UsingNamespace/given a versioned ApiController per namespace/when using a url segment and attribute-based routing.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
#pragma warning disable IDE1006 // Naming Styles
44

5+
//// Ignore Spelling: Dbased
6+
57
namespace given_a_versioned_ApiController_per_namespace;
68

79
using Asp.Versioning;

src/AspNet/Acceptance/Asp.Versioning.WebApi.Acceptance.Tests/Http/UsingNamespace/given a versioned ApiController per namespace/when using a url segment and convention-based routing.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
#pragma warning disable IDE1006 // Naming Styles
44

5+
//// Ignore Spelling: Dbased
6+
57
namespace given_a_versioned_ApiController_per_namespace;
68

79
using Asp.Versioning;

src/AspNet/Acceptance/Asp.Versioning.WebApi.Acceptance.Tests/OData/ODataAcceptanceTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Copyright (c) .NET Foundation and contributors. All rights reserved.
22

3+
//// Ignore Spelling: Dspecific
4+
35
namespace Asp.Versioning.OData;
46

57
using static System.Net.HttpStatusCode;

src/AspNet/OData/test/Asp.Versioning.WebApi.OData.ApiExplorer.Tests/Conventions/ODataValidationSettingsConventionTest.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
// Copyright (c) .NET Foundation and contributors. All rights reserved.
22

3+
//// Ignore Spelling: Dlike
4+
//// Ignore Spelling: Multipart
5+
//// Ignore Spelling: nonaction
6+
//// Ignore Spelling: nonquery
7+
38
namespace Asp.Versioning.Conventions;
49

510
using Asp.Versioning.Description;

src/AspNet/OData/test/Asp.Versioning.WebApi.OData.Tests/Routing/VersionedAttributeRoutingConventionTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Copyright (c) .NET Foundation and contributors. All rights reserved.
22

3+
//// Ignore Spelling: Dneutral
4+
35
namespace Asp.Versioning.Routing;
46

57
using Microsoft.AspNet.OData;

src/AspNet/WebApi/src/Asp.Versioning.WebApi/Controllers/ActionSelectorCacheItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace Asp.Versioning.Controllers;
2323
/// </summary>
2424
internal sealed class ActionSelectorCacheItem
2525
{
26-
private static readonly HttpMethod[] cacheListMethodKinds = new[] { HttpMethod.Get, HttpMethod.Put, HttpMethod.Post };
26+
private static readonly HttpMethod[] cacheListMethodKinds = [HttpMethod.Get, HttpMethod.Put, HttpMethod.Post];
2727
private readonly HttpControllerDescriptor controllerDescriptor;
2828
private readonly CandidateAction[] combinedCandidateActions;
2929
private readonly Dictionary<HttpActionDescriptor, string[]> actionParameterNames = [];

src/AspNet/WebApi/test/Asp.Versioning.WebApi.ApiExplorer.Tests/ApiExplorer/VersionedApiExplorerTest.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
// Copyright (c) .NET Foundation and contributors. All rights reserved.
22

3+
//// Ignore Spelling: Dcase
4+
//// Ignore Spelling: Dinsensitive
35

46
namespace Asp.Versioning.ApiExplorer;
7+
58
using Asp.Versioning.Models;
69
using Asp.Versioning.Routing;
710
using Asp.Versioning.Simulators;

0 commit comments

Comments
 (0)