Resolve CA1863 by using emitted methods #3264
Labels
✨ Enhancement
Issues marked with this label indicate further enhancements to the program, such as new features.
🟢 Low priority
Issues marked with this label are actively being worked on if nothing serious is on the list.
🙏 Wishlist
Issues marked with this label are wishlisted. We'd like to make them happen but they're not crucial.
Checklist
Enhancement purpose
ASF ignored CA1863 for a while now due to dotnet/roslyn-analyzers#7032. We should aim to resolve it now that we have an option.
Solution
I did the initial part of using the new source generator in 7a8e209 -
EmitFormatMethods="true"
can be used for telling source generator to emit format options, afterwards, we need to do a lot of manual labour to replace every single occurance ofstring.Format()
that we have today with the new method.Why currently available solutions are not sufficient?
Existing
string.Format()
calls is a lot of boilerplate code, CA1863 is just a cherry on top. Now that there is a better solution to deal with this, we should prefer it.Can you help us with this enhancement idea?
Yes, I can code the solution myself and send a pull request
Additional info
There are cases where plugins use ASF localization in part to avoid more work on their end - we'll need to
#pragma warning disable
those places beforeEmitFormatMethods="true"
generates public methods.dotnet/roslyn-analyzers#7360
The text was updated successfully, but these errors were encountered: