【问题标题】:Eclipse Checkstyle - unable to parse configuration streamEclipse Checkstyle - 无法解析配置流
【发布时间】:2015-04-11 22:50:55
【问题描述】:

尝试将 suppresss.xml 添加到我的检查样式中。但是我无法选择我的 suppresss.xml 文件的工作区路径。

<module name="SuppressionFiler">
<property name="file" value="${workspace_loc}/com.test.checkstyle/conf/suppressions.xml"/>
</module>

我总是得到一个错误:

在项目上运行构建器“Checkstyle Builder”时出错 'Checkstyle_Test'。无法解析配置流 - 属性 ${workspace_loc} 尚未设置。

我也无权访问 ${buildir}。

如何找到工作区项目目录?

编辑:如果我输入总路径,我正在寻找抑制.xml。

【问题讨论】:

  • 不确定,但我想您需要使用${config_loc}/suppressions.xml${config_loc} 是 Eclipse 的一个变量,它将引用 checkstyle.xml 所在的同一目录。
  • ty 确实有效。我还必须将“conf”文件夹添加到我的 build.properties,如 bin.includes
  • 很高兴知道。将其作为答案发布。

标签: java xml eclipse checkstyle


【解决方案1】:

您可以将config_loc 用作:${config_loc}/suppressions.xml,而不是workspace_loc

${config_loc} 是 Eclipse 的一个变量,它将引用 checkstyle.xml 所在的同一目录。

【讨论】:

    猜你喜欢
    • 2019-11-26
    • 1970-01-01
    • 2019-03-25
    • 2019-01-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多