How to disable CppUnusedIncludeDirective for all occurrences of a file Follow
If I have a #include that ReSharper C++ always gets wrong, in terms of it being unused (when it's always used), can I annotate that header file or store in settings somewhere, a global exclusion? I mean rather than having to do this over and over:
#include "whatever.h" // ReSharper disable once CppUnusedIncludeDirective
Can I put something in whatever.h to make ReSharper just always ignore it? At some point I can put together a proper bug report for this, because it gets a few things wrong in our codebase (heavy templates involved so will take me some time to extract a reasonable test case when I am just looking for a quick fix in the short term).
Please sign in to leave a comment.
I don't think it's possible to turn off this inspection just for a single file, although I guess we can implement some mechanism for that. We'd appreciate if you could describe the details about this header and its contents, or even better if you could create a repro case for us. We'd really prefer to fix the issue instead of you having to silence it :)
I will try to create a reproduction case this week.