How to suppress a StyleCop warning?

后端 未结 12 1368
心在旅途
心在旅途 2020-11-27 18:23

I\'m using StyleCop and want to suppress some warning which does not suit my style. I prefer to have solution for

1) in-line code suppressing
2) global setting

12条回答
  •  -上瘾入骨i
    2020-11-27 19:05

    In addition to the helpful answers already in place:

    If you suppress a warning in the suppression file GlobalSuppressions.cs, you can edit that [assembly: SuppressMessage(StyleCop...blabla line and entirely remove the Scope=... and Target=... tags. That makes the suppression global in the project.

提交回复
热议问题