dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.86k stars 672 forks source link

No quick fix avaible ever #4588

Open vdurante opened 3 years ago

vdurante commented 3 years ago

Issue Description

omnisharp never suggests any quickfix

Steps to Reproduce

No clue. Quick fix simply doesn't work on any issues

Expected Behavior

Should suggest a quick fix

Actual Behavior

No quick fix available image

Logs

OmniSharp log

```json { "Request_seq": 202, "Command": "/v2/getcodeactions", "Running": true, "Success": true, "Message": null, "Body": { "CodeActions": [ { "Identifier": "SA1508CodeFixProvider", "Name": "Remove blank lines preceding this brace" }, { "Identifier": "RR0103", "Name": "Remove method" }, { "Identifier": "RR0031", "Name": "Duplicate method" }, { "Identifier": "RR0027", "Name": "Comment out method" }, { "Identifier": "RR0092", "Name": "Remove all statements" }, { "Identifier": "Extract base class...", "Name": "Extract base class..." } ] }, "Seq": 2162, "Type": "response" } ```

C# log

empty

Environment information

VSCode version: 1.56.2 C# Extension: 1.23.12

Dotnet Information .NET SDK (reflecting any global.json): Version: 5.0.203 Commit: 383637d63f Runtime Environment: OS Name: Windows OS Version: 10.0.19042 OS Platform: Windows RID: win10-x64 Base Path: c:\program files\dotnet\sdk\5.0.203\ Host (useful for support): Version: 5.0.6 Commit: 478b2f8c0e .NET SDKs installed: 2.2.207 [c:\program files\dotnet\sdk] 3.1.300 [c:\program files\dotnet\sdk] 3.1.409 [c:\program files\dotnet\sdk] 5.0.203 [c:\program files\dotnet\sdk] .NET runtimes installed: Microsoft.AspNetCore.All 2.2.8 [c:\program files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.2.8 [c:\program files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.4 [c:\program files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.15 [c:\program files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.6 [c:\program files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.28 [c:\program files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.8 [c:\program files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.4 [c:\program files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.15 [c:\program files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.6 [c:\program files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.4 [c:\program files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.15 [c:\program files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.6 [c:\program files\dotnet\shared\Microsoft.WindowsDesktop.App] To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions |Extension|Author|Version| |---|---|---| |azure-account|ms-vscode|0.9.8| |better-comments|aaron-bond|2.1.0| |better-powershell-syntax-highlighting|justin-grote|0.0.2| |bracket-pair-colorizer|CoenraadS|1.0.61| |code-settings-sync|Shan|3.4.3| |csharp|ms-dotnettools|1.23.12| |debugger-for-chrome|msjsdiag|4.12.12| |debugger-for-edge|msjsdiag|1.0.15| |dotnet-interactive-vscode|ms-dotnettools|1.0.2256020| |EditorConfig|EditorConfig|0.16.4| |gitlens|eamodio|11.4.1| |jupyter|ms-toolsai|2021.6.832593372| |material-icon-theme|PKief|4.7.0| |material-theme|zhuangtongfa|3.10.14| |powershell|ms-vscode|2021.2.2| |selectline-statusbar|tomoki1207|0.0.2| |vscode-icons|vscode-icons-team|11.4.0| |vscode-peacock|johnpapa|3.9.1| |vscode-pull-request-github|GitHub|0.26.0| |vscode-todo-highlight|wayou|1.0.4| |vscodeintellicode|VisualStudioExptTeam|1.2.14| |vsliveshare|ms-vsliveshare|1.0.4272|;
filipw commented 3 years ago

The rule that you show comes from Stylecop, it is not part of OmniSharp. I don't think Stylecop ships a code fix for SA1508 https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/4d9b3e3bb785a55f73b3029a843f0c0b73cc9ea7/StyleCop.Analyzers/StyleCop.Analyzers/LayoutRules/SA1508ClosingBracesMustNotBePrecededByBlankLine.cs