Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a5bdf17
✨ add configurable response negotiator base class for serialization
gimlichael Mar 1, 2026
b33a1e5
✨ add extension methods for IEndpointConventionBuilder metadata
gimlichael Mar 1, 2026
0eaecf6
✅ add unit tests for endpoint convention builder and response negotiator
gimlichael Mar 1, 2026
855bf89
✨ add newtonsoft json negotiator for json response serialization
gimlichael Mar 1, 2026
5100d67
✨ add json response negotiator for serialization using system.text.json
gimlichael Mar 1, 2026
61f68d2
✨ add yaml response negotiator for serialization support
gimlichael Mar 1, 2026
750c792
✨ add xml response negotiator for serialization support
gimlichael Mar 1, 2026
2050ab3
✅ add newtonsoft json negotiator tests for media type handling
gimlichael Mar 1, 2026
78120d6
✅ add json response negotiator tests for media type handling
gimlichael Mar 1, 2026
0e30618
✅ add yaml response negotiator tests for media type handling
gimlichael Mar 1, 2026
e716719
✅add xml response negotiator tests for media type handling
gimlichael Mar 1, 2026
73bb25c
✅ add world module and response negotiators for json, xml, yaml
gimlichael Mar 1, 2026
d635bad
✨ add docfx configuration and build scripts for documentation generation
gimlichael Mar 1, 2026
b6edb23
✨ add ci pipeline, scorecard, service update, and downstream triggers
gimlichael Mar 1, 2026
78b3093
✨ add bump-nuget script for simplified package version updates
gimlichael Mar 1, 2026
bff5cca
✨ add code of conduct, contributing guidelines, and documentation
gimlichael Mar 1, 2026
01dde5f
✨ add NuGet package definition
gimlichael Mar 1, 2026
a4d901f
✨ add new project files for json, yaml, and xml response negotiators
gimlichael Mar 1, 2026
de31691
✅ add test for solution
gimlichael Mar 1, 2026
656344e
⬆️ add dependencies
gimlichael Mar 1, 2026
d3a02ba
✨ add .editorconfig and .gitignore for project configuration
gimlichael Mar 1, 2026
bb30db4
💬 add community health pages
gimlichael Mar 1, 2026
0b273fe
✨ add solution file with project structure for extensions
gimlichael Mar 1, 2026
80ddf47
✏️ update sonarcloud project key due to key taken
gimlichael Mar 1, 2026
b37514d
📝 update changelog date for initial stable release
gimlichael Mar 1, 2026
1dc9444
✏️ fixed typo
gimlichael Mar 1, 2026
a1fe5d1
✨ add 128x128 png image for documentation
gimlichael Mar 1, 2026
04a271a
fix: correct LICENSE link in README.md (#2)
Copilot Mar 1, 2026
fe63839
Fix NullReferenceException in ConfigurableResponseNegotiator when Acc…
Copilot Mar 1, 2026
7e405e0
fix: prevent StreamWriter from disposing HttpResponse.Body in Configu…
Copilot Mar 1, 2026
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
4 changes: 4 additions & 0 deletions .docfx/BuildDocfxImage.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$version = minver -i -t v -v w
docfx metadata docfx.json
docker buildx build -t carter-docfx:$version --platform linux/arm64,linux/amd64 --load -f Dockerfile.docfx .
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

--load incompatible with multi-platform builds.

The --load flag loads the built image into the local Docker daemon, but this only works for single-platform images. When building for multiple platforms (linux/arm64,linux/amd64), Docker cannot load multi-arch images locally. The build will either fail or only load one platform.

Consider either:

  1. Build for a single platform when loading locally
  2. Use --push to push multi-platform images to a registry
Proposed fix for local development (single platform)
-docker buildx build -t carter-docfx:$version --platform linux/arm64,linux/amd64 --load -f Dockerfile.docfx .
+docker buildx build -t carter-docfx:$version --platform linux/amd64 --load -f Dockerfile.docfx .

Or for multi-platform with registry push:

-docker buildx build -t carter-docfx:$version --platform linux/arm64,linux/amd64 --load -f Dockerfile.docfx .
+docker buildx build -t carter-docfx:$version --platform linux/arm64,linux/amd64 --push -f Dockerfile.docfx .
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
docker buildx build -t carter-docfx:$version --platform linux/arm64,linux/amd64 --load -f Dockerfile.docfx .
docker buildx build -t carter-docfx:$version --platform linux/amd64 --load -f Dockerfile.docfx .
Suggested change
docker buildx build -t carter-docfx:$version --platform linux/arm64,linux/amd64 --load -f Dockerfile.docfx .
docker buildx build -t carter-docfx:$version --platform linux/arm64,linux/amd64 --push -f Dockerfile.docfx .
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.docfx/BuildDocfxImage.ps1 at line 3, The docker build invocation in
.docfx/BuildDocfxImage.ps1 uses --load with multi-platform targets which is
incompatible; update the docker buildx command that references Dockerfile.docfx
and the tag carter-docfx:$version to either (A) build a single platform when
using --load (e.g., remove the multi-platform list and add --platform
linux/amd64) for local development, or (B) remove --load and add --push to
publish the multi-platform image to a registry; ensure the chosen change is
applied to the docker buildx build line in the script so the flags match the
intended single- or multi-platform workflow.

get-childItem -recurse -path api -include *.yml, .manifest | remove-item
17 changes: 17 additions & 0 deletions .docfx/Dockerfile.docfx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ARG NGINX_VERSION=1.29.5-alpine

FROM --platform=$BUILDPLATFORM nginx:${NGINX_VERSION} AS base
RUN rm -rf /usr/share/nginx/html/*

FROM --platform=$BUILDPLATFORM codebeltnet/docfx:2.78.5 AS build

ADD [".", "docfx"]

RUN cd docfx; \
docfx build

FROM nginx:${NGINX_VERSION} AS final
WORKDIR /usr/share/nginx/html
COPY --from=build /build/docfx/wwwroot /usr/share/nginx/html

ENTRYPOINT ["nginx", "-g", "daemon off;"]
3 changes: 3 additions & 0 deletions .docfx/PublishDocfxImage.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$version = minver -i -t v -v w
docker tag carter-docfx:$version jcr.codebelt.net/geekle/carter-docfx:$version
docker push jcr.codebelt.net/geekle/carter-docfx:$version
Comment on lines +1 to +3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Verify the current state of the PowerShell script
rg -n "ErrorActionPreference|Set-StrictMode|Get-Command minver|IsNullOrWhiteSpace|throw" .docfx/PublishDocfxImage.ps1 || echo "No guard patterns found"

Repository: codebeltnet/carter

Length of output: 85


🏁 Script executed:

# Also read the full file to understand its current state
cat -n .docfx/PublishDocfxImage.ps1

Repository: codebeltnet/carter

Length of output: 252


Add fail-fast and version validation before tagging and pushing.

The script lacks error handling: if minver fails or returns an empty value, Lines 2–3 will execute with an invalid tag. Add strict error handling and validate $version before use.

🛠️ Proposed hardening
+$ErrorActionPreference = 'Stop'
+Set-StrictMode -Version Latest
+
+$minver = Get-Command minver -ErrorAction SilentlyContinue
+if (-not $minver) { throw "minver CLI is required but was not found in PATH." }
+
 $version = minver -i -t v -v w
+if ([string]::IsNullOrWhiteSpace($version)) { throw "Resolved version is empty." }
+
 docker tag carter-docfx:$version jcr.codebelt.net/geekle/carter-docfx:$version
 docker push jcr.codebelt.net/geekle/carter-docfx:$version
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
$version = minver -i -t v -v w
docker tag carter-docfx:$version jcr.codebelt.net/geekle/carter-docfx:$version
docker push jcr.codebelt.net/geekle/carter-docfx:$version
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version Latest
$minver = Get-Command minver -ErrorAction SilentlyContinue
if (-not $minver) { throw "minver CLI is required but was not found in PATH." }
$version = minver -i -t v -v w
if ([string]::IsNullOrWhiteSpace($version)) { throw "Resolved version is empty." }
docker tag carter-docfx:$version jcr.codebelt.net/geekle/carter-docfx:$version
docker push jcr.codebelt.net/geekle/carter-docfx:$version
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.docfx/PublishDocfxImage.ps1 around lines 1 - 3, The script calls minver and
blindly uses $version for docker tag/push; add fail-fast and validation by
setting $ErrorActionPreference = 'Stop' before invoking minver (or run minver
with -ErrorAction Stop), wrap the minver call in try/catch to capture failures,
validate that $version is not null/empty/whitespace (e.g., use
[string]::IsNullOrWhiteSpace($version)), and if validation fails call
Write-Error/throw and exit with non-zero status; only execute docker tag/push
when $version is valid.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
uid: Codebelt.Extensions.Carter.AspNetCore.Newtonsoft.Json
summary: *content
---
The `Codebelt.Extensions.Carter.AspNetCore.Newtonsoft.Json` namespace contains types that provide JSON response negotiation for Carter, capable of serializing response models to JSON format using `Newtonsoft.Json`.

[!INCLUDE [availability-modern](../../includes/availability-modern.md)]
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
uid: Codebelt.Extensions.Carter.AspNetCore.Text.Json
summary: *content
---
The `Codebelt.Extensions.Carter.AspNetCore.Text.Json` namespace contains types that provide JSON response negotiation for Carter, capable of serializing response models to JSON format using `System.Text.Json`.

[!INCLUDE [availability-modern](../../includes/availability-modern.md)]
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
uid: Codebelt.Extensions.Carter.AspNetCore.Text.Yaml
summary: *content
---
The `Codebelt.Extensions.Carter.AspNetCore.Text.Yaml` namespace contains types that provide YAML response negotiation for Carter, capable of serializing response models to YAML format using `YamlDotNet`.

[!INCLUDE [availability-modern](../../includes/availability-modern.md)]
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
uid: Codebelt.Extensions.Carter.AspNetCore.Xml
summary: *content
---
The `Codebelt.Extensions.Carter.AspNetCore.Xml` namespace contains types that provide XML response negotiation for Carter, capable of serializing response models to XML format using `System.Xml.XmlWriter`.

[!INCLUDE [availability-modern](../../includes/availability-modern.md)]
13 changes: 13 additions & 0 deletions .docfx/api/namespaces/Codebelt.Extensions.Carter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
uid: Codebelt.Extensions.Carter
summary: *content
---
The Codebelt.Extensions.Carter namespace contains types and extension methods that complements the Carter namespace by providing configurable response negotiation, endpoint convention builder extensions and content negotiation for ASP.NET Core minimal APIs.

[!INCLUDE [availability-modern](../../includes/availability-modern.md)]

### Extension Methods

|Type|Ext|Methods|
|--:|:-:|---|
|IEndpointConventionBuilder|⬇️|`Produces<TResponse>`, `Produces`|
91 changes: 91 additions & 0 deletions .docfx/docfx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"metadata": [
{
"src": [
{
"files": [
"Codebelt.Extensions.Carter/**.csproj",
"Codebelt.Extensions.Carter.AspNetCore.Newtonsoft.Json/**.csproj",
"Codebelt.Extensions.Carter.AspNetCore.Text.Json/**.csproj",
"Codebelt.Extensions.Carter.AspNetCore.Text.Yaml/**.csproj",
"Codebelt.Extensions.Carter.AspNetCore.Xml/**.csproj"
],
"src": "../src"
}
],
"dest": "api",
"filter": "filterConfig.yml",
"properties": {
"TargetFramework": "net10.0"
}
}
],
"build": {
"xref": [
"https://docs.cuemon.net/xrefmap.yml?v=20260120",
"https://newtonsoft.codebelt.net/xrefmap.yml",
"https://yamldotnet.codebelt.net/xrefmap.yml",
"https://github.com/dotnet/docfx/raw/main/.xrefmap.json"
],
"content": [
{
"files": [
"api/**/*.yml",
"api/**/*.md",
"packages/**/*.md",
"toc.yml",
"*.md"
],
"exclude": [
"bin/**",
"obj/**"
]
}
],
"resource": [
{
"files": [
"images/**"
]
}
],
"globalMetadata": {
"_appTitle": "Extensions for Carter by Codebelt",
"_appFooter": "<span>Generated by <strong>DocFX</strong>. Copyright 2026 Geekle. All rights reserved.</span>",
"_appLogoPath": "images/50x50.png",
"_appFaviconPath": "images/favicon.ico",
"_googleAnalyticsTagId": "G-GGL98GEYWE",
"_enableSearch": false,
"_disableContribution": false,
"_gitContribute": {
"repo": "https://github.com/codebeltnet/carter",
"branch": "main"
},
"_gitUrlPattern": "github"
},
"dest": "wwwroot",
"globalMetadataFiles": [],
"fileMetadataFiles": [],
"template": [
"default",
"modern"
],
"overwrite": [
{
"files": [
"api/namespaces/**.md"
],
"exclude": [
"obj/**",
"wwwroot/**"
]
}
],
"postProcessors": [],
"markdownEngineName": "markdig",
"noLangKeyword": false,
"keepFileLink": false,
"cleanupCacheHistory": false,
"disableGitFeatures": false
}
}
4 changes: 4 additions & 0 deletions .docfx/filterConfig.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiRules:
- exclude:
uidRegex: ^System\.Object
type: Type
Binary file added .docfx/images/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .docfx/images/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .docfx/images/50x50.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .docfx/images/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions .docfx/includes/availability-modern.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Availability: .NET 10
11 changes: 11 additions & 0 deletions .docfx/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
uid: frontpage-md
title: Extensions for Carter by Codebelt
---
![Extensions for Carter API by Codebelt](/images/128x128.png)

# Extensions for Carter by Codebelt

This project is part of [Extensions for Carter by Codebelt](https://github.com/codebeltnet/carter).

Proceed to the [docs](/api/Codebelt.Extensions.Carter.html) to learn more about the capabilities of this project.
4 changes: 4 additions & 0 deletions .docfx/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: Carter API
href: api/Codebelt.Extensions.Carter.html
- name: NuGet
href: packages
193 changes: 193 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# Default: prefer spaces for data/markup
indent_style = space
indent_size = 2
tab_width = 2

# This style rule concern the use of the range operator, which is available in C# 8.0 and later.
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0057
[*.{cs,vb}]
dotnet_diagnostic.IDE0057.severity = none

# This style rule concerns the use of switch expressions versus switch statements.
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0066
[*.{cs,vb}]
dotnet_diagnostic.IDE0066.severity = none

# Performance rules
# https://docs.microsoft.com/da-dk/dotnet/fundamentals/code-analysis/quality-rules/performance-warnings
[*.{cs,vb}]
dotnet_analyzer_diagnostic.category-Performance.severity = none # Because many of the suggestions by performance analyzers are not compatible with .NET Standard 2.0

Comment on lines +24 to +28
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n .editorconfig

Repository: codebeltnet/carter

Length of output: 9405


Narrow broad performance suppression scope.

Line 27 disables the entire Performance category for all C#/VB files, which suppresses useful findings on modern TFMs. Remove this broad suppression and keep only the specific rules already listed below that are genuinely unsupported for .NET Standard 2.0: CA1846, CA1847, CA1865–CA1867, CA2249, and CA2263 (lines 135–165).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.editorconfig around lines 24 - 28, The .editorconfig currently disables the
entire Performance analyzer category via the setting
dotnet_analyzer_diagnostic.category-Performance.severity = none; remove that
broad suppression and instead leave only explicit exceptions for the specific
rules unsupported by .NET Standard 2.0 (CA1846, CA1847, CA1865, CA1866, CA1867,
CA2249, CA2263) that already appear later in the file; update the config so
Performance category is not globally disabled for [*.{cs,vb}] and ensure only
the listed CA#### rule keys are set to none.

# This style rule concerns the use of using statements without curly braces, also known as using declarations. This alternative syntax was introduced in C# 8.0.
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0063
[*.{cs,vb}]
dotnet_diagnostic.IDE0063.severity = none

# This style rule concerns with simplification of interpolated strings to improve code readability. It recommends removal of certain explicit method calls, such as ToString(), when the same method would be implicitly invoked by the compiler if the explicit method call is removed.
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0071
[*.{cs,vb}]
dotnet_diagnostic.IDE0071.severity = none

# S3267: Loops should be simplified with "LINQ" expressions
# https://rules.sonarsource.com/csharp/RSPEC-3267
dotnet_diagnostic.S3267.severity = none

# CA1859: Use concrete types when possible for improved performance
# This is a violation of Framework Design Guidelines.
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1859
[*.{cs,vb}]
dotnet_diagnostic.CA1859.severity = none

# IDE0008: Use explicit type
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0007-ide0008
[*.{cs,vb}]
dotnet_diagnostic.IDE0008.severity = none

[*.{cs,vb}]
indent_style = space
indent_size = 4

# IDE0161: Namespace declaration preferences
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0161
# Prefer file-scoped namespaces for new files; existing block-scoped files should not be converted unless explicitly asked
[*.cs]
csharp_style_namespace_declarations = file_scoped:suggestion

# Top-level statements: DO NOT USE
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0210-ide0211
# This is enforced via a style preference set to error severity, not a language-level prohibition.
# Always use explicit class declarations with a proper namespace and Main method where applicable.
[*.cs]
csharp_style_prefer_top_level_statements = false:error

[*.xml]
indent_style = space
indent_size = 2

# IDE0078: Use pattern matching
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0078
[*.{cs,vb}]
dotnet_diagnostic.IDE0078.severity = none

# IDE0290: Use primary constructor
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0290
[*.{cs,vb}]
dotnet_diagnostic.IDE0290.severity = none

# CA1200: Avoid using cref tags with a prefix
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1200
[*.{cs,vb}]
dotnet_diagnostic.CA1200.severity = none

# IDE0305: Use collection expression for fluent
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0305
[*.{cs,vb}]
dotnet_diagnostic.IDE0305.severity = none

# IDE0011: Add braces
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0011
[*.{cs,vb}]
dotnet_diagnostic.IDE0011.severity = none

# IDE0028: Use collection initializers or expressions
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0028
[*.{cs,vb}]
dotnet_diagnostic.IDE0028.severity = none

# IDE0039: Use collection expression for array
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0300
[*.{cs,vb}]
dotnet_diagnostic.IDE0300.severity = none

# IDE0031: Use collection expression for empty
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0301
[*.{cs,vb}]
dotnet_diagnostic.IDE0301.severity = none

# IDE0046: Use conditional expression for return
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0046
[*.{cs,vb}]
dotnet_diagnostic.IDE0046.severity = none

# IDE0047: Parentheses preferences
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0047-ide0048
[*.{cs,vb}]
dotnet_diagnostic.IDE0047.severity = none

# CA1716: Identifiers should not match keywords
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1716
[*.{cs,vb}]
dotnet_diagnostic.CA1716.severity = none

# CA1720: Identifiers should not contain type names
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1720
[*.{cs,vb}]
dotnet_diagnostic.CA1720.severity = none

# CA1846: Prefer AsSpan over Substring
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1846
# Excluded while TFMs include netstandard2.0
[*.{cs,vb}]
dotnet_diagnostic.CA1846.severity = none

# CA1847: Use String.Contains(char) instead of String.Contains(string) with single characters
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1847
# Excluded while TFMs include netstandard2.0
[*.{cs,vb}]
dotnet_diagnostic.CA1847.severity = none

# CA1865-CA1867: Use 'string.Method(char)' instead of 'string.Method(string)' for string with single char
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1865-ca1867
# Excluded while TFMs include netstandard2.0
[*.{cs,vb}]
dotnet_diagnostic.CA1865.severity = none
dotnet_diagnostic.CA1866.severity = none
dotnet_diagnostic.CA1867.severity = none

# CA2263: Prefer generic overload when type is known
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2263
# Excluded while TFMs include netstandard2.0
[*.{cs,vb}]
dotnet_diagnostic.CA2263.severity = none

# CA2249: Consider using String.Contains instead of String.IndexOf
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2249
# Excluded while TFMs include netstandard2.0
[*.{cs,vb}]
dotnet_diagnostic.CA2249.severity = none

# IDE0022: Use expression body for methods
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0022
[*.{cs,vb}]
dotnet_diagnostic.IDE0022.severity = none

# IDE0032: Use auto-property
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0032
[*.{cs,vb}]
dotnet_diagnostic.IDE0032.severity = none

# Order modifiers
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0036
# Excluded becuase of inconsistency with other analyzers
[*.{cs,vb}]
dotnet_diagnostic.IDE0036.severity = none

# Order modifiers
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0036
# Excluded becuase of inconsistency with other analyzers
[*.{cs,vb}]
dotnet_diagnostic.IDE0036.severity = none

# Use 'System.Threading.Lock'
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0330
# Excluded while TFMs are less than net9.0
[*.{cs,vb}]
dotnet_diagnostic.IDE0330.severity = none
Loading
Loading