Skip to content
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

CS1591 warnings still appearing despite adding to <NoWarn> #2561

Closed
coldacid opened this issue Sep 28, 2018 · 5 comments · May be fixed by TheRealPiotrP/omnisharp-vscode#60
Closed

CS1591 warnings still appearing despite adding to <NoWarn> #2561

coldacid opened this issue Sep 28, 2018 · 5 comments · May be fixed by TheRealPiotrP/omnisharp-vscode#60

Comments

@coldacid
Copy link

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   2.1.402
 Commit:    3599f217f4

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17134
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.402\

Host (useful for support):
  Version: 2.1.4
  Commit:  85255dde3e

.NET Core SDKs installed:
  1.0.4 [C:\Program Files\dotnet\sdk]
  1.1.10 [C:\Program Files\dotnet\sdk]
  2.1.2 [C:\Program Files\dotnet\sdk]
  2.1.4 [C:\Program Files\dotnet\sdk]
  2.1.202 [C:\Program Files\dotnet\sdk]
  2.1.400 [C:\Program Files\dotnet\sdk]
  2.1.401 [C:\Program Files\dotnet\sdk]
  2.1.402 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 1.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

VS Code version: 1.27.2
C# Extension version: 1.16.1

Steps to reproduce

  1. Create new C# project.

  2. Add the following to the csproj file:

      <PropertyGroup>
         <GenerateDocumentationFile>true</GenerateDocumentationFile>
         <NoWarn>$(NoWarn);1591</NoWarn>
       </PropertyGroup>
    
  3. Open the Problems pane, if not already open.

  4. Build the project.

  5. Note that "Missing XML comment" warnings appear in the Problems pane, despite CS1591 being ignored in the csproj file.

  6. Build the project and read the build log.

Expected behavior

"Missing XML comment" warnings do not appear, either in the Problems pane or the build log for the project.

Actual behavior

The Problems pane lists "Missing XML comment for..." warnings, despite CS1591 being included in the NoWarn list. (Build log is as expected.)

@filipw
Copy link
Contributor

filipw commented Apr 12, 2019

Could you provide a repro project that caused you trouble or try again with the latest version?
This is definitely supported, and I just verified this again and it works (both for the CS1591 and 1591 syntax under <NoWarn>).

@sanxing-chen
Copy link

sanxing-chen commented Jul 23, 2019

@filipw In my case, this issue is causing by a project level .ruleset configuration. It’s weird that the <CodeAnalysisRuleSet> isn’t overridden by <NoWarn>.

@coldacid
Copy link
Author

I didn't have a ruleset configured when I encountered this problem but I do find that with the current versions of VS Code, the extension, and the dotnet SDK, the problem no longer occurs for me.

@filipw
Copy link
Contributor

filipw commented Jul 24, 2019

thanks a lot for confirming. if you have any ruleset problems, please open a new issue - it's a separate, new feature. thanks.

@filipw filipw closed this as completed Jul 24, 2019
@ksidirop-laerdal
Copy link

Note: If you have an .editorconfig file you'll have to edit it too and set the associated codes to 'none' - otherwise you'll still get warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants