Skip to content

Commit f9cbbf7

Browse files
committed
[RelEng] Add JavaDoc-Basher Pull-Request check
The added check runs the javadoc-basher on each PR and ensures the JavaDoc of all public API elements is synchronized for all platforms. In case that run leads to changes in the git worktree, the check fails.
1 parent 12597f1 commit f9cbbf7

2 files changed

Lines changed: 64 additions & 0 deletions

File tree

.github/workflows/pr-checks.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,23 @@ jobs:
1919
with:
2020
botName: Eclipse Platform Bot
2121
botMail: platform-bot@eclipse.org
22+
23+
check-javadoc-consistency:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
27+
- uses: actions/setup-java@de5a937a1dc73fbc1a67d7d1aa4bebc1082f3190 # v5.0.0
28+
with:
29+
java-version: 25
30+
distribution: 'temurin'
31+
cache: maven
32+
- name: Run JavaDoc basher
33+
run: >
34+
mvn --non-recursive --batch-mode --no-transfer-progress
35+
-Pjavadoc-basher exec:exec@run-javadoc-basher
36+
- name: Verify no changes
37+
run: |
38+
if ! git diff --exit-code ; then
39+
echo "::error title=Inconsistent JavaDoc::JavaDoc-Basher discovered JavaDoc inconsistencies between implementations, which must be resolved."
40+
exit 1
41+
fi

pom.xml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,50 @@
179179
</plugins>
180180
</build>
181181
</profile>
182+
<profile>
183+
<id>javadoc-basher</id>
184+
<build>
185+
<plugins>
186+
<plugin>
187+
<groupId>org.codehaus.mojo</groupId>
188+
<artifactId>exec-maven-plugin</artifactId>
189+
<version>3.6.3</version>
190+
<executions>
191+
<execution>
192+
<id>run-javadoc-basher</id>
193+
<goals>
194+
<goal>exec</goal>
195+
</goals>
196+
<phase>validate</phase>
197+
<configuration>
198+
<forceJava>true</forceJava>
199+
<workingDirectory>bundles/org.eclipse.swt.tools</workingDirectory>
200+
<executable>java</executable>
201+
<arguments>
202+
<argument>-classpath</argument>
203+
<classpath/>
204+
<argument>JavadocBasher/org/eclipse/swt/tools/internal/JavadocBasher.java</argument>
205+
</arguments>
206+
<includePluginDependencies>true</includePluginDependencies>
207+
</configuration>
208+
</execution>
209+
</executions>
210+
<dependencies>
211+
<dependency>
212+
<groupId>org.eclipse.jdt</groupId>
213+
<artifactId>org.eclipse.jdt.core</artifactId>
214+
<version>[3.44.0,)</version>
215+
</dependency>
216+
<dependency>
217+
<groupId>org.eclipse.platform</groupId>
218+
<artifactId>org.eclipse.jface</artifactId>
219+
<version>[3.38.0,)</version>
220+
</dependency>
221+
</dependencies>
222+
</plugin>
223+
</plugins>
224+
</build>
225+
</profile>
182226
</profiles>
183227

184228

0 commit comments

Comments
 (0)