Preventing multiple reporting of the same rule violation in FxCop -- What is Id?
- by Dave
FxCop is currently reporting the same rule violation for a particular method -- it has two out parameters, because I want to return two values to the caller without creating a struct for it. I wonder if anonymous types would solve my problem, but I didn't know about them at the time I had written the method.
Anyhow, I'm getting CheckId CA1021 reported once for each parameter. I've copied the SuppressMessage text from FxCop, and then realized that the Id for each message is different! To me, it seems like you only need the CheckId, so...
what is the Id used for? I haven't been able to find information about it online.
will the Id remain the same? I assume so, or SuppressMessage wouldn't work the way one would want it to
is there a way to specify the SuppressMessage attribute so that it suppresses for all Ids?