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
@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
This was referenced Dec 15, 2025
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