gpt4 book ai didi

visual-studio - 是否可以将 Microsoft 规则集(FxCop 规则)集成到 Resharper 中?

转载 作者:行者123 更新时间:2023-12-05 07:59:57 26 4
gpt4 key购买 nike

我们有一个大型遗留解决方案(170 多个项目)并且想要:

  1. 使用我们定义的规则为我们所有的代码库自动执行初始代码清理。
  2. 提供可与 ReSharper 集成的插件,以便我们可以在代码中看到警告/提示/建议,并使用 Ctrl + Enter 应用快速修复。
  3. 在源代码控制中进行配置,以便在所有团队成员之间共享,并在每次提交后由 TeamCity 检查编码风格。

为此,我们发现最好的方法是为此使用 R# + StyleCop,但我最近发现 FxCop 和 Visual Studio 使用的代码质量有更多规则 - Microsoft Code Analisys 规则集: http://msdn.microsoft.com/en-us/library/dd264925.aspx

StyleCop 规则集与其不兼容。我们更愿意遵循 Microsoft 规则集,而不是 StyleCop 规则集。

问题:有没有一种方法可以将 Microsoft 规则集(自定义)集成到 ReSharper 中并具有以上所有三项 - 清理、快速修复、TeamCity 与 Microsoft 规则的集成?经过一天的谷歌搜索后,我没有找到该怎么做。谁能推荐一下?

最佳答案

我相信这应该可以在 resharper 中实现。

ReSharper allows you to configure an extensive set of formatting rules and enforce them in your code. These rules are applied when ReSharper produces new code with code completion and code generation features, code templates and refactorings. The formatting rules can be also applied to the existing code in the current selection, current file, or in a larger scope up to the entire solution.

来源:Jetbrains Resharper Help

关于visual-studio - 是否可以将 Microsoft 规则集(FxCop 规则)集成到 Resharper 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19974175/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com