How to suppress a StyleCop warning of entire namespace files

二次信任 提交于 2019-12-04 23:10:15

The SuppressMessage directive will only process the current file (see the comments in this stylecop issue).

You could possibly achieve what you want via file lists, although this will work best if there are only a few files you want to apply this exclusion to. If you want this applied to all files in a particular project, then the easiest way may be to simply modify the settings via the settings dialog as already mentioned.

Alternatively, you could put all the namespace related files into a separate folder, and have a custom settings file in that folder to exclude these rules from those particular files.

I think it's better just to disable the documentation rules on the StyleCop settings file.

Just open the settings dialog from the project context menu.

And then uncheck the 'Documentation Rules' checkbox.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!