[英]Can I configure Visual Studio 2010 to show warnings only in my source code?
I like having a high level of warnings (usually W4). 我喜欢高水平的警告(通常是W4)。 However, with a warning level of 4 or higher, I get a lot of warnings from Windows headers and from third party headers, which makes it very difficult to find the ones I can actually do something about.
但是,警告级别为4或更高时,我会收到来自Windows标头和第三方标头的大量警告,这使得我很难找到实际可以做的事情。
Hence my question: Can I tell Visual Studio to show warnings only for those files which belong to my current project? 因此我的问题是:我是否可以告诉Visual Studio仅针对属于我当前项目的那些文件显示警告?
This would be especially useful when running code analysis. 这在运行代码分析时尤其有用。 Why show all those warnings for code that I don't own?
为什么要显示我不拥有的代码的所有警告?
I found one thing that might help: 我找到了一件可能有用的东西:
Right click anywhere on one of the rows in the Error List and click Grouping->Path. 右键单击错误列表中其中一行的任意位置,然后单击“分组 - >路径”。 The path to the file will show up on the left.
该文件的路径将显示在左侧。 Now you can collapse all the paths to code that you want to ignore.
现在,您可以折叠要忽略的代码的所有路径。
It's not ideal, but it's better than nothing. 它并不理想,但总比没有好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.