我如何开始整合pyflakes与哈德森 [英] How would I start integrating pyflakes with Hudson

查看:160
本文介绍了我如何开始整合pyflakes与哈德森的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用Hudson与Violations Plugin持续集成,以解析我们从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."

推荐答案

您可以调整pyflakes和pep8输出以使用Violations pylint插件。

You can adapt pyflakes and pep8 output to work with the Violations pylint plugin.

pyflakes path/to/src | awk -F\: '{printf "%s:%s: [E]%s\n", $1, $2, $3}' > violations.pyflakes.txt

pep8 path/to/src | awk -F\: '{printf "%s:%s: [%s]%s\n", $1, $2, substr($4,2,4), substr($4,6)}' > violations.pep8.txt

您可以使用正则表达式或连接输出来生成包含多个指标。

You could use a regex or concatenate the output to generate a report that includes multiple metrics.

有关详细信息,请参阅 http://hustoknow.blogspot.com/2011/01/integration-pyflakes-into-hudson.html

For more details see http://hustoknow.blogspot.com/2011/01/integration-pyflakes-into-hudson.html

这篇关于我如何开始整合pyflakes与哈德森的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆