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

Redundant usings (IDE0005) warning/error cannot be triggered using 'dotnet build' #50533

Closed
maxild opened this issue Jan 15, 2021 · 2 comments
Closed
Assignees
Milestone

Comments

@maxild
Copy link

maxild commented Jan 15, 2021

Version Used:

sdk-5.0.102 built-in Microsoft.CodeAnalysis.CSharp.CodeStyle (3.8.0)

Steps to Reproduce:

I have a public gh repo test case (very little code)

Offending source
https://github.com/maxild/SourceCodeAnalysisSpike/blob/a27692be112aeaa3b00201489e728e6c2cdf34dc/src/Program.cs#L5-L6

correct csproj props for enforcing code styles in build
https://github.com/maxild/SourceCodeAnalysisSpike/blob/a27692be112aeaa3b00201489e728e6c2cdf34dc/src/SourceCodeAnalysisSpike.csproj#L8-L9

correct editorconfig
https://github.com/maxild/SourceCodeAnalysisSpike/blob/a27692be112aeaa3b00201489e728e6c2cdf34dc/.editorconfig#L64-L65

correct build command (#43051 (comment))
https://github.com/maxild/SourceCodeAnalysisSpike/blob/a27692be112aeaa3b00201489e728e6c2cdf34dc/build.ps1

Expected Behavior:

See errors after CLI build.

Actual Behavior:

The CLI build succeeds. Not even warnings are reported.

Related Issues

Possibly a dup of #33558 (Just thought many more IDxxxx rules could be raised as warnings on CLI build using .NET 5 sdk?)

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Analyzers untriaged Issues and PRs which have not yet been triaged by a lead labels Jan 15, 2021
@jinujoseph jinujoseph added Bug and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Jan 19, 2021
@jinujoseph jinujoseph added this to the 16.10 milestone Jan 19, 2021
@mavasani
Copy link
Contributor

@maxild Have you enabled xml doc comments on the project? See the Note section at https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0005 for details.

@maxild
Copy link
Author

maxild commented Jan 19, 2021

@mavasani I missed that, my mistake. Sry. It builds with the expected number of IDE0005 warnings, as expected now (after having suppressed CS1591:smile:)

@maxild maxild closed this as completed Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants