Skip to content

Commit

Permalink
Add scripts/javadoc.sh lint/build script
Browse files Browse the repository at this point in the history
  • Loading branch information
wavejumper committed Jan 8, 2025
1 parent 69eec06 commit 5943313
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
java-version: '11'
- name: Install Clojure tools
uses: DeLaGuardo/[email protected]
with:
lein: 'latest'
- run: lein kaocha
- run: lein kondo
- run: lein fmt
- run: lein fmt
- name: lint javadoc
run: ./scripts/javadoc.sh
18 changes: 18 additions & 0 deletions scripts/javadoc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# Best practice shell options
set -euo pipefail
IFS=$'\n\t'

# Run the javadoc command with the -quiet option
OUTPUT=`javadoc -quiet -classpath "$(lein classpath)" -Xdoclint:all -d target/javadoc-out $(find src -name "*.java") 2>&1`

# Check if there is any output
if [ -n "$OUTPUT" ]; then
echo "Javadoc warnings or errors detected:"
echo "$OUTPUT"
exit 1
else
echo "Javadoc completed successfully with no warnings or errors."
exit 0
fi
2 changes: 1 addition & 1 deletion src/java/io/factorhouse/kpow/key/ClusterIdKeyStrategy.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.util.concurrent.ExecutionException;

/**
* The default key strategy uses the cluster ID, obtained via an {@link org.apache.kafka.clients.admin.Admin#describeClusters()} call.
* The default key strategy uses the cluster ID, obtained via an {@link org.apache.kafka.clients.admin.Admin#describeCluster()} call.
* This AdminClient is created once during registry initialization and then closed.
*/
public class ClusterIdKeyStrategy implements KeyStrategy {
Expand Down

0 comments on commit 5943313

Please sign in to comment.