我正在使用 Oomph 自动化我们的 IDE 设置。我目前正忙于 Checkstyle。使用记录器功能,当我设置我们公司自己的 Checkstyle 配置时,不会保存任何设置。我该如何解决这个问题?
问问题
132 次
1 回答
0
https://www.eclipse.org/forums/index.php/t/803782/:
将Resource Creation
任务添加到您的设置文件,因为 Checkstyle 将其首选项保存在专用文件中,而不是在 Oomph 设置中。
例如:
<setupTask
xsi:type="setup:CompoundTask"
id="checkstyle.prefs"
disabled="false"
name="Checkstyle Setup">
<setupTask
xsi:type="setup:ResourceCreationTask"
excludedTriggers="BOOTSTRAP"
filter=""
content="<?xml version="1.0" encoding="UTF-8"?>

<checkstyle-configurations file-format-version="5.0.0" default-check-configuration="GOOS Checkstyle">
 <check-configuration name="GOOS Checkstyle" location="configuration\checkstyle\goos-checkstyle.xml" type="external" description="">
 <additional-data name="protect-config-file" value="true"/>
 </check-configuration>
</checkstyle-configurations>
"
targetURL="${workspace.location|uri}/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml"
encoding="UTF-8">
<description></description>
</setupTask>
</setupTask>
targetURL
指定 Checkstyle 首选项的标准保存位置。这也是您可以查找自己的 Checkstyle 配置的地方,因此您可以将其添加到content
OomphResource Creation
任务中。
于 2019-04-09T13:15:52.977 回答