我将如何开始将 pyflakes 与 Hudson 集成
我们使用 Hudson 与 Violations 插件进行持续集成,该插件解析 pylint 的输出。然而,pylint 有点过于严格,并且难以配置。我们更愿意使用 pyflakes,它会给我们正确的“你做错了”的级别。
We use Hudson for continuous integration with the Violations Plugin which parses our output from pylint. However, pylint is a bit too strict, and hard to configure. What we'd rather use is pyflakes which would give us the right level of "You're doing it wrong."
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以调整 pyflakes 和 pep8 输出以与 Violations pylint 插件配合使用。
您可以使用正则表达式或连接输出来生成包含多个指标的报告。
有关更多详细信息,请参阅 http://hustoknow.blogspot.com/2011 /01/integration-pyflakes-into-hudson.html
You can adapt pyflakes and pep8 output to work with the Violations pylint plugin.
You could use a regex or concatenate the output to generate a report that includes multiple metrics.
For more details see http://hustoknow.blogspot.com/2011/01/integration-pyflakes-into-hudson.html
Violations 插件需要来自它支持的各种检查器的 xml 输出。
我不熟悉 pyflakes,但从我的简短扫描来看,它似乎不支持 xml 作为输出类型。因此,在让 Violations 尝试解析它之前,您必须对 pyflakes 输出进行后处理(或者您可以修改 pyflakes 并编写自己的消息输出类)。您可能想要捕获 pylint 输出并使用它来找出 Violations 插件喜欢的适当 xml 格式。
The Violations plugin requires xml output from the various checkers that it supports.
I'm not familiar with pyflakes, but from my brief scan, it doesn't appear to support xml as an output type. So you'll have to post-process the pyflakes output before letting Violations try to parse it (or you could modify pyflakes and write your own Message output class). You'll probably want to capture the pylint output and use that to figure out the appropriate xml format that the Violations plugin likes.
这是错误的:一些检查器(例如“checkstyle”)输出 XML,另一些检查器(例如“pylint”和“pep8”)输出“文本”文件,每行一条记录。 Jenkins“XML 文件名模式”中的标题明显具有误导性。
This is wrong: Some checkers like "checkstyle" output XML, some others like "pylint" and "pep8" output "text" files with one record per line. The heading in Jenkins "XML filename pattern" is plain misleading.