Substage - 制作符合 MS StyleCop 的模板

发布于 2024-07-19 05:20:47 字数 377 浏览 7 评论 0原文

我最近有一个规模很大的爱好项目,大约 66K LOC,位于 http://www.wheelmud.net ,一名团队成员获得了符合 MS StyleCop 的大部分代码。 唯一剩下的就是我们的数据层。 正如您可以想象的那样,它会经常重新生成,因为我们仍处于开发的早期阶段。

我尝试修改 aspx 模板,但我发现有很多问题需要修复。 我首先看到的是 using 语句位于名称空间声明之上。 有什么方法可以通过模板修改此行为,还是我需要对 SubStage 的代码进行电锯操作?

我不介意更改源代码,但我想在开始之前先询问一下。我之前曾在其他项目中这样做过。

I have a good sized hobby project, around 66K LOC, over at http://www.wheelmud.net Recently, a team member got the bulk of the code MS StyleCop compliant. The only thing left is our data layer. As you can imagine, this gets regenerated fairly often, as we are still in the early stages of development.

I tried modifying the aspx templates, but I saw quite a few things that I need fixed. The first thing I saw was that the using statements were on top of the namespace declaration. Is there any way to modify this behavior through the templates, or do I need to take a chainsaw to SubStage's code?

I don't mind changing the source, but I wanted to ask first before I jump in. I have done this before for other projects.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

神经暖 2024-07-26 05:20:47

我将把所有现有模板滚动到 T4 中,以避免将来出现模板问题。 我们仍然会支持旧的东西 - 但使用 T4 来做到这一点确实会对像您这样的情况有帮助

I'm going to roll all of the existing templates into T4 to avoid future template issues. We'll still support the old stuff - but using T4 to do this will really help situations like yours

临风闻羌笛 2024-07-26 05:20:47

在 2.2 版本中,添加了一个补丁,将标签添加到生成的文件顶部,这样它们就会被 StyleCop 忽略。 查看此问题

In version 2.2, a patch was added to add a tag to the top of generated files so they would be ignored by StyleCop. See this issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文