Add MA0185: Simplify string.Create with culture-invariant parameters#986
Add MA0185: Simplify string.Create with culture-invariant parameters#986
Conversation
Co-authored-by: meziantou <509220+meziantou@users.noreply.github.com>
Co-authored-by: meziantou <509220+meziantou@users.noreply.github.com>
Co-authored-by: meziantou <509220+meziantou@users.noreply.github.com>
|
@copilot Can you regenerate the documentation? |
The documentation is already up to date. I ran the DocumentationGenerator and it confirmed no changes were needed. Both MA0184 (from the main branch merge) and MA0185 (this PR's rule) are properly documented in README.md, docs/README.md, and their respective rule documentation files. |
|
Error: /home/runner/work/Meziantou.Analyzer/Meziantou.Analyzer/src/Meziantou.Analyzer/Rules/SimplifyStringCreateWhenAllParametersAreCultureInvariantAnalyzer.cs(74,43): error CS0246: The type or namespace name 'IInterpolatedStringHandlerCreationOperation' could not be found (are you missing a using directive or an assembly reference?) [/home/runner/work/Meziantou.Analyzer/Meziantou.Analyzer/src/Meziantou.Analyzer/Meziantou.Analyzer.csproj::TargetFramework=net10.0] |
Co-authored-by: meziantou <509220+meziantou@users.noreply.github.com>
Fixed in commit d582111. Added |
string.Create(CultureInfo.InvariantCulture, $"...")with only culture-invariant parameters$"..."Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.