【发布时间】:2012-07-27 09:25:24
【问题描述】:
Phing,默认情况下,甚至使用任何内置记录器(phing.listener.NoBannerLogger、phing.listener.AnsiColorLogger、phing.listener.XmlLogger 和 phing.listener.HtmlColorLogger)都有非常详细的输出。
我的用例是使用 Phing 作为预提交挂钩来运行测试。因此,我不关心日志 phing 中可能提供给我的所有信息。 我只是将它用作运行测试的多平台工具。
例子:
Buildfile: /private/var/workspace/www/me_com/build.xml
SBKSWWW > main:
[delete] Deleting /private/var/workspace/www/me_com/temp/pre-commit-hook/changed_files
[delete] Deleting directory /private/var/workspace/www/me_com/temp/pre-commit-hook
[mkdir] Created dir: /private/var/workspace/www/me_com/temp/pre-commit-hook
[phplint] Parse error: parse error in ./www/MyTest.php on line 2
[phpcodesniffer] 2 files where checked
[phpcodesniffer] No syntax errors detected
BUILD FINISHED
Total time: 0.3430 seconds
其中许多行对于我的用例来说确实是多余且无用的。实际上我什至不运行原始含义的“构建”。
我想让 phing 日志看起来像这样:
✔ Commited code matches coding standards
✘ Commited code has syntax errors!
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in MyTest.php on line 2
如果您认为我出于自己的目的使用了不好的工具,也请告诉我,我很高兴知道还有别的东西。
【问题讨论】:
标签: php phing pre-commit-hook