ant - CruiseControl - PHP lint 检查通过 ANT 而不是通过 CruiseControl

标签 ant cruisecontrol lint phplint

所以我正在编写一个 ant 构建文件,它将在 Cruisecontrol 中使用并遇到一个奇怪的问题。我在谷歌上搜索了这个问题,但没有遇到任何具体的解决方案,所以我想我会在这里发布这个问题。

我有以下 Ant 任务:

<target name="module.lint">
    <apply executable="/usr/bin/php" failonerror="true">
        <arg value="-l" />
        <fileset dir="/path/to/my/elite/code" includes="**/*.php" />
    </apply>
</target>

当我使用以下命令运行它时:
ant -buildfile /path/to/my/elite/buildfiles/project/elite/build.xml module.lint

它运行良好,但是当我尝试通过 CruiseControl GUI 构建项目时,出现以下错误:
[cc]Aug-09 15:51:04 ScriptRunner  - fileset: Setup scanner in dir /path/to/my/elite/code with patternSet{ includes: [**/*.php] excludes: [] }
[cc]Aug-09 15:51:04 ScriptRunner  -     [apply] Executing '/usr/bin/php' with arguments:
[cc]Aug-09 15:51:04 ScriptRunner  -     [apply] '-l'
[cc]Aug-09 15:51:04 ScriptRunner  -     [apply] '/path/to/my/elite/code/Script.php'
[cc]Aug-09 15:51:04 ScriptRunner  -     [apply]
[cc]Aug-09 15:51:04 ScriptRunner  -     [apply] The ' characters around the executable and arguments are
[cc]Aug-09 15:51:04 ScriptRunner  -     [apply] not part of the command.
[cc]Aug-09 15:51:04 ScriptRunner  - Execute:Java13CommandLauncher: Executing '/usr/bin/php' with arguments:
[cc]Aug-09 15:51:04 ScriptRunner  - '-l'
[cc]Aug-09 15:51:04 ScriptRunner  - '/path/to/my/elite/code/Script.php'
[cc]Aug-09 15:51:04 ScriptRunner  -
[cc]Aug-09 15:51:04 ScriptRunner  - The ' characters around the executable and arguments are
[cc]Aug-09 15:51:04 ScriptRunner  - not part of the command.
[cc]Aug-09 15:51:04 ScriptRunner  -     [apply] No syntax errors detected in /path/to/my/elite/code/Script.php

不知道为什么我会收到“字符......不是命令的一部分”错误,尽管看起来确实执行了 lint 检查。

我需要做什么来修复“字符......不是命令的一部分”错误?

最佳答案

当从 CruiseControl 运行构建时,这些消息表明 Ant 正在详细或 Debug模式下运行。 (尝试使用 -v 选项从命令行运行以亲自查看。)

检查构建的 CC 配置 - 查看是否 usedebug或类似的设置。或者,可以使用某种自定义日志记录在调试级别进行记录。

关于ant - CruiseControl - PHP lint 检查通过 ANT 而不是通过 CruiseControl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11893263/

相关文章:

eclipse - 创建 ANT 文件以在 Eclipse 和 CruiseControl 中使用

c# - Visual Studio 中的变量命名约定是否有任何可以在开发时强制执行的规则?

c - 函数返回错误类型的变量时没有编译错误

c++ - 最高操作 'constant' 没有副作用 [MISRA 2004 Rule 14.2]

if-statement - 如何在 Ant 的条件语句中包含多个 if 情况

php - Cruise Control 作为 PHPUnderControl 与 Hudson for PHP

ant - 使用 Apache Ant 删除目录中的所有文件(不包含子目录)

svn - 使用 CruiseControl.net 时将参数传递给 svn

java - 从自定义 ant 任务覆盖 ant 属性

ant - 在 ant 中漂亮地打印逗号分隔的字符串列表