制作 StyleCop &詹金斯听从我的命令
我们正在尝试使用最新版本的 StyleCop 设置 Jenkins。
我们现有的 Jenkins 设置通过 StyleCopCmd 通过 nant 调用 StyleCop,但 StyleCopCmd 似乎越来越过时且无人维护;我宁愿把它剪掉。因此,最好的支持解决方案似乎是从 msbuild 调用 StyleCop。
我们的解决方案由多个项目组成,但 Jenkins Violations 插件需要一个 stylecop.violations.xml
文件,因此广泛记录的导入 StyleCop.targets 并从中调用它的解决方案每个“csproj”文件似乎都不起作用(因为这会产生多个违规文件,Jenkins 插件无法处理)。
SO:
- 是否有某种方法可以合并多个 StyleCop 违规文件,以便 Jenkins Violations 插件将它们视为一个文件,或者
- 在 Msbuild 中是否有某种方法可以查看多个“.csproj”文件,提取“.cs”文件并通过 StyleCop 一次性运行它们。或者:
- 鉴于我们使用 Jenkins 和多个项目文件,是否有另一种方法来报告解决方案中所有项目的违规行为?
非常感谢任何帮助。
We're trying to set up Jenkins with the latest version of StyleCop.
Our existing Jenkins setup invokes StyleCop via StyleCopCmd via nant, but StyleCopCmd seems to be increasingly out-of-date, and unmaintained; and I’d rather cut it out. So best supported solution seems to be to invoke StyleCop from msbuild.
Our solution consists of multiple projects, but the Jenkins Violations plugin expects a single stylecop.violations.xml
file, so the widely documented solution of importing StyleCop.targets and invoking it from each 'csproj' file seems like it won’t work (because this would produce multiple violations files, which the Jenkins plugin can't cope with).
SO:
- Is there some way of merging multiple StyleCop violations files so that they are treated as one by the Jenkins Violations plugin, OR
- Is there some way, in Msbuild, of peeking into multiple '.csproj' files, extracting the '.cs' files and running them all through StyleCop in a one-er. Alternatively:
- Given we're using Jenkins and multiple project files, is there another way of reporting violations for all of the projects in the solution?
Any help gratefully received.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅:http://ferritedog.wordpress.com/2011/05/27/1-hour-guide-to-continuous-integration-setup-jenkins-meets-net/
基本上,使用 XML 文件名模式
**/*/StyleCopViolations.xml
。See this: http://ferritedog.wordpress.com/2011/05/27/1-hour-guide-to-continuous-integration-setup-jenkins-meets-net/
Basically, use the XML FileName Pattern
**/*/StyleCopViolations.xml
.