如何使用Oomph配置Checkstyle设置

问题描述 投票:1回答:1

我正在使用Oomph自动化我们的IDE设置。我现在正忙着Checkstyle。使用录像机功能,当我设置公司自己的Checkstyle配置时,不会保存任何设置。我该如何解决这个问题?

eclipse checkstyle oomph
1个回答
0
投票

https://www.eclipse.org/forums/index.php/t/803782/

Resource Creation任务添加到您的安装文件,因为Checkstyle将其首选项保存在专用文件中而不是Oomph设置中。

E.克:

<setupTask
      xsi:type="setup:CompoundTask"
      id="checkstyle.prefs"
      disabled="false"
      name="Checkstyle Setup">
    <setupTask
        xsi:type="setup:ResourceCreationTask"
        excludedTriggers="BOOTSTRAP"
        filter=""
        content="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&#xA;&#xA;&lt;checkstyle-configurations file-format-version=&quot;5.0.0&quot; default-check-configuration=&quot;GOOS Checkstyle&quot;>&#xA;  &lt;check-configuration name=&quot;GOOS Checkstyle&quot; location=&quot;configuration\checkstyle\goos-checkstyle.xml&quot; type=&quot;external&quot; description=&quot;&quot;>&#xA;    &lt;additional-data name=&quot;protect-config-file&quot; value=&quot;true&quot;/>&#xA;  &lt;/check-configuration>&#xA;&lt;/checkstyle-configurations>&#xA;"
        targetURL="${workspace.location|uri}/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml"
        encoding="UTF-8">
      <description></description>
    </setupTask>
  </setupTask>

targetURL指定了Checkstyle首选项的标准保存位置。这也是您可以查找自己的Checkstyle配置的地方,因此您可以将其添加到Oomph content任务的Resource Creation中。

© www.soinside.com 2019 - 2024. All rights reserved.