-
Notifications
You must be signed in to change notification settings - Fork 786
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
Bulk codefixes are broken #14967
Labels
Area-LangService-CodeFixes
Code fixes associated with diagnostics
Area-VS-Editor
VS editor support for F# code, not covered elsewhere
Bug
Milestone
Comments
psfinaki
added
Bug
Area-VS-Editor
VS editor support for F# code, not covered elsewhere
Needs-Triage
labels
Mar 23, 2023
Found something in the docs and we do not seem to use it centrally. namespace Microsoft.CodeAnalysis.CodeFixes
open Microsoft.CodeAnalysis.CodeFixes
///<summary>
/// Implement this type to provide fixes for source code problems.
/// Remember to use <see cref="T:Microsoft.CodeAnalysis.CodeFixes.ExportCodeFixProviderAttribute" /> so the host environment can offer your fixes in a UI.
/// </summary>
type CodeFixProvider =
new: unit -> unit
member ComputeRequestPriority: unit -> Microsoft.CodeAnalysis.CodeActions.CodeActionRequestPriority
///<summary>
/// Gets an optional <see cref="T:Microsoft.CodeAnalysis.CodeFixes.FixAllProvider" /> that can fix all/multiple occurrences of diagnostics fixed by this code fix provider.
/// Return null if the provider doesn't support fix all/multiple occurrences.
/// Otherwise, you can return any of the well known fix all providers from <see cref="T:Microsoft.CodeAnalysis.CodeFixes.WellKnownFixAllProviders" /> or implement your own fix all provider.
/// </summary>
member GetFixAllProvider: unit -> FixAllProvider The unused opens uses a wellknown batch provider, which has limitation in it's remarks which causes the unused opens to not work. ///<summary>
/// Contains well known implementations of <see cref="T:Microsoft.CodeAnalysis.CodeFixes.FixAllProvider" />.
/// </summary>
type WellKnownFixAllProviders =
///<summary>
/// Default batch fix all provider.
/// This provider batches all the individual diagnostic fixes across the scope of fix all action,
/// computes fixes in parallel and then merges all the non-conflicting fixes into a single fix all code action.
/// This fixer supports fixes for the following fix all scopes:
/// <see cref="F:Microsoft.CodeAnalysis.CodeFixes.FixAllScope.Document" />, <see cref="F:Microsoft.CodeAnalysis.CodeFixes.FixAllScope.Project" />, <see cref="F:Microsoft.CodeAnalysis.CodeFixes.FixAllScope.Solution" /><see cref="F:Microsoft.CodeAnalysis.CodeFixes.FixAllScope.ContainingMember" /> and <see cref="F:Microsoft.CodeAnalysis.CodeFixes.FixAllScope.ContainingType" />.
/// </summary>
///<remarks>
/// The batch fix all provider only batches operations (i.e. <see cref="T:Microsoft.CodeAnalysis.CodeActions.CodeActionOperation" />) of type
/// <see cref="T:Microsoft.CodeAnalysis.CodeActions.ApplyChangesOperation" /> present within the individual diagnostic fixes. Other types of
/// operations present within these fixes are ignored.
/// </remarks>
static member BatchFixer: FixAllProvider |
Duplicate of #14864 |
github-project-automation
bot
moved this from Not Planned
to Done
in F# Compiler and Tooling
Mar 27, 2023
psfinaki
added
Area-LangService-CodeFixes
Code fixes associated with diagnostics
and removed
Needs-Triage
labels
Jun 15, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area-LangService-CodeFixes
Code fixes associated with diagnostics
Area-VS-Editor
VS editor support for F# code, not covered elsewhere
Bug
C#:
csharp.mp4
F#:
fsharp.mp4
Nothing happens in F#. This is sad.
Known workarounds
Apply codefixes one by one? Regex replace?
Additional context
Discovered during some F# session with @T-Gro
The text was updated successfully, but these errors were encountered: