Unused private members for targets in Visual Studio (IDE0051) #1468
Unanswered
robertcoltheart
asked this question in
Q&A
Replies: 1 comment
-
Personally, I'm using JetBrains annotations to mark code entities as implicitly used. But this should really only be necessary for targets that are neither a dependency or the default target. I.e., only targets that are manually invoked are a concern. Otherwise, there should always be some kind of usage. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Visual studio shows certains targets as being "unused", when clearly they will be used as part of a Nuke build.
I'm a maintainer over at Machine.Specifications and we have the same issue with using delagates for test targets.
I'm aware that you can add supressions in code attributes / editorconfig etc, but I'm just wondering if there are any thoughts or ideas as to how you could suppress
IDE0051
at the source instead? I've toyed with the idea of a source analyzer (Roslyn) to suppress the diagnostic or a source generator to "use" the delegates to prevent reporting the diagnostic.Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions