Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 4, 2025

  • Update MA0011 documentation to mention CultureInsensitiveTypeAttribute
  • Run documentation generator to ensure all files are up to date
  • Verify the build passes with the changes
  • Create comprehensive CultureInsensitiveTypeAttribute documentation file
  • Update all rules (MA0011, MA0075, MA0076) to link to the new documentation
  • Add NuGet package link and mention attribute can be redefined locally
  • Add usage example showing no warning with isDefaultFormatCultureInsensitive: true
  • Replace inline attribute code with link to source definition
Original prompt

This section details on the original issue you should resolve

<issue_title>Many false positives for Uild.Tostring</issue_title>
<issue_description>### Version of the Meziantou.Analyzer NuGet package

2.0.238

Rule Identifier

MA0011

Target Framework

net8.0

C# Language version

C# 12

Description

We are using this package:
https://github.com/Cysharp/Ulid

It provides a ToString Method and even the usual overloads but de facto all Methods are Culture independent.
So raising MA0011 seems useless

For the implementation of ToString see: https://github.com/Cysharp/Ulid/blob/9594ed65e737977a22e7835c8569d33a9acb1a25/src/Ulid/Ulid.cs#L514

Example

Reproduction Steps

Minimal code:

Ulid.NewUlid().ToString();

Other information

No response</issue_description>

<agent_instructions>Can you update the documentation of MA0011 to include a mention to the CultureInsensitiveTypeAttribute?</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Update MA0011 documentation to include CultureInsensitiveTypeAttribute Document CultureInsensitiveTypeAttribute for MA0011 Nov 4, 2025
Copilot AI requested a review from meziantou November 4, 2025 14:52
Copilot finished work on behalf of meziantou November 4, 2025 14:52
@meziantou meziantou marked this pull request as ready for review November 4, 2025 15:04
@meziantou
Copy link
Owner

@copilot Can you add a new file to fully document the attribute, and add a mention to it in all rules using this attribute?

Copy link
Contributor Author

Copilot AI commented Nov 4, 2025

@copilot Can you add a new file to fully document the attribute, and add a mention to it in all rules using this attribute?

Done! I've created a comprehensive documentation file at docs/CultureInsensitiveTypeAttribute.md that covers all constructors and usage scenarios. All three rules (MA0011, MA0075, MA0076) now link to this documentation. The changes are in commit d5f20ce.

Copilot AI changed the title Document CultureInsensitiveTypeAttribute for MA0011 Add comprehensive CultureInsensitiveTypeAttribute documentation Nov 4, 2025
Copilot finished work on behalf of meziantou November 4, 2025 15:12
Copilot AI requested a review from meziantou November 4, 2025 15:29
Copilot finished work on behalf of meziantou November 4, 2025 15:29
Copilot finished work on behalf of meziantou November 4, 2025 15:34
Copilot AI requested a review from meziantou November 4, 2025 16:00
Copilot finished work on behalf of meziantou November 4, 2025 16:00
This was referenced Nov 13, 2025
IhateTrains pushed a commit to ParadoxGameConverters/ImperatorToCK3 that referenced this pull request Nov 15, 2025
Updated
[Meziantou.Analyzer](https://github.com/meziantou/Meziantou.Analyzer)
from 2.0.249 to 2.0.253.

<details>
<summary>Release notes</summary>

_Sourced from [Meziantou.Analyzer's
releases](https://github.com/meziantou/Meziantou.Analyzer/releases)._

## 2.0.253

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.253>

**Full Changelog**:
meziantou/Meziantou.Analyzer@2.0.252...2.0.253

## 2.0.252

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.252>

## What's Changed
* Updated `NamedParameterAnalyzer` to handle language version checks for
C# 14 by @​meziantou in
meziantou/Meziantou.Analyzer#925


**Full Changelog**:
meziantou/Meziantou.Analyzer@2.0.251...2.0.252

## 2.0.251

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.251>

## What's Changed
* Add comprehensive CultureInsensitiveTypeAttribute documentation by
@​Copilot in meziantou/Meziantou.Analyzer#922
* Update to .NET 10 by @​meziantou in
meziantou/Meziantou.Analyzer#924


**Full Changelog**:
meziantou/Meziantou.Analyzer@2.0.250...2.0.251

## 2.0.250

NuGet package:
<https://www.nuget.org/packages/Meziantou.Analyzer/2.0.250>

## What's Changed
* MA0011: Skip diagnostic for culture-invariant interpolated strings by
@​Copilot in meziantou/Meziantou.Analyzer#919


**Full Changelog**:
meziantou/Meziantou.Analyzer@2.0.249...2.0.250

Commits viewable in [compare
view](meziantou/Meziantou.Analyzer@2.0.249...2.0.253).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Meziantou.Analyzer&package-manager=nuget&previous-version=2.0.249&new-version=2.0.253)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Many false positives for Uild.Tostring

2 participants