-
Notifications
You must be signed in to change notification settings - Fork 467
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
CA1801 warning shown on build/analysis, disappears when source file is opened #1713
Comments
Dupe of FYI @jinujoseph @heejaechang, error list behavior is due to compilation end action bug. |
@mavasani do we have a bug that this should have included quotes, like this?
|
@sharwell I do not believe so. I think quite a few of our diagnostic messages were created by an automated tool that ported messages from old FxCop implementation. I will file an issue to audit the messages. |
Thanks for taking a look; however, I don't think this is a duplicate. After enabling full solution analysis (which I think seems to be the suggested fix from reading through some other referenced issues), the inconsistency with the disappearing messages is gone. So that part, I would agree, is covered by the other issue. But the real issue is that I shouldn't see the |
@markashleybell Sorry, my bad that I put a wrong dupe ID in #1713 (comment). The other issue is dupe of #1606, which was recently fixed in Roslyn and should not repro in VS15.8 |
@mavasani That's great, looks like that will solve my issue then! Thanks for the update. |
Analyzer package
Microsoft.CodeAnalysis.FxCopAnalyzers, version 2.6.1
Analyzer
ReviewUnusedParameters
Repro steps
I have several custom error types in my project, all derived from a base type:
When I run code analysis in VS2017 (
ALT+F11
) or build the solution, I get a bunch of CA1801 warnings in the Error List referring to the subclassed error types. For the example above the error is:However, that parameter is used, and indeed when I double-click the warning in the error list, as soon as the source file opens in VS the warning disappears.
Expected behavior
CA1801 warning should not appear in this case.
Actual behavior
CA1801 warnings are added to error list when Code Analysis is run or on solution build, but disappear on opening the source file.
The text was updated successfully, but these errors were encountered: