Suppress DPA messages on a specific method

Hi there,

I am trying to exclude a specific method from the DPA. What I actually did is using the SuppressMessage Attribute on the Method:
[SuppressMessage("ReSharper.DPA", "DPA0001: Memory allocation issues")]

But the DPA still keeps showing issues detected in that method. How can I tell the DPA Plugin to ignore a specific method?

0
4 comments

Hi Michael,

My guess is that you add SuppressMessage attribute not via Alt+Enter + Suppress, but manually e.g. copying from the help page. If so, you need to click the Refresh button in the Dynamic Application Analysis window to apply the changes.

0

Hi Julia,

actually I did add it using Alt+Enter+Supress. I also tried using the exclude filter in the settings and added the method there but I still get the issues shown by the DPA. But I never used any refresh button. What I did is clean the issues output by using the delete key on the items (missing some clear key/button there actually :)).

I just tried using the refresh button but I still receive the issues.


0

Michael,

We've reproduced this issue: https://youtrack.jetbrains.com/issue/DPA-199. Please watch it for updates.
The reason is that async method is called, and actually the issue doesn't belong to current method. Workaround is here: https://youtrack.jetbrains.com/issue/DPA-199#focus=Comments-27-4619170.0-0

0

Great, thanks for the update.

0

Please sign in to leave a comment.