May 21, 2015 09:42
@JeroenVannevel you've been playing with the analyzer code. I've got a question for you when you have a second. Let's say I have a class that I use internally, but am in turn exposing a slightly altered interface of it to COM Interop. So, for the sake of code reuse, this class needs a particular constructor that should only be used by code in my Rubberduck.SourceControl.Interop
namespace.
If I created a custom attribute, like Obsolete
only different. Something like InteropOnly
say... I should be able to write an analyzer to reflect over the code, look for the attribute and if the namespace isn't Interop
, raise a warning about it, right?
I know that sounds very theoretical (because it is), but it seems to be an interesting possible use of a project specific analyzer. Thoughts about it?