-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quick action to move symbols from PublicApi.Unshipped.txt to PublicApi.Shipped.txt #3226
Comments
Is it possible to have quick actions on text files? At worst we can have the quick action on the code member not the text file. |
It is not, and it's quite frustrating when it comes to this particular analyzer. |
Marking as blocked on dotnet/roslyn#29268, although supporting code fixes in non-code documents would be equally usable for this. |
We wrote a script to do this for us: https://github.com/microsoft/ApplicationInsights-dotnet/blob/develop/.scripts/tool_FinalizePublicApi.ps1 |
I believe @333fred also has a script that does this for Roslyn repo. Fred, can you give a pointer? |
I wasn't happy with the complex powershell based one, and wanted a simpler and more platform agnostic one in Bash (irony anyone? thanks Git for Windows!), so I came up with this: https://github.com/AshleighAdams/Verlite/blob/master/src/Verlite.Core/mark-shipped.sh |
It would be very helpful if moving APIs from unshipped to shipped was part of the "tooling experience" for the public API tracking feature of Microsoft.CodeAnalysis.PublicApiAnalyzers. Of course I can copy and use one of the above scripts in our repos but it is doomed to break in the future as new versions Microsoft.CodeAnalysis.PublicApiAnalyzers are released. How about offering a global tool together with Microsoft.CodeAnalysis.PublicApiAnalyzers? |
Analyzer package
Microsoft.CodeAnalysis.PublicApiAnalyzers
Package Version
v2.9.8 (Latest)
I'm not sure if this is even possible or not, but it would be nice to be able to have a cleaner method of promoting entries in the
PublicApi.Unshipped.txt
toPublicApi.Shipped.txt
. I'm thinking of something like a quick action or context action to be able to move all records in thePublicAPI.Unshipped.txt
file toPublicApi.Shipped.txt
when shipping. If that's not possible, maybe adding a diagnostic that defaults to "info/message" level that just gives the developer the ability to move entries between the files, in order to preserve the "correct" structure and organization of the file.Until now, to do this I have just deleted everything in both files and ran the existing codefix to add everything in the project to the Unshipped file, and then copied them all over to the Shipped file, which isn't that much extra work, but it is a bit of a nuisance, and it would be nice to have an alternative method if possible.
The text was updated successfully, but these errors were encountered: