From d16d7deb1b3c5b2b2b35109dfea935e65860a02e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9lio=20Costa?= Date: Thu, 8 Oct 2026 18:42:52 -0300 Subject: [PATCH] Add a CI lint job: javac -Xlint:all as errors and javadoc doclint A new `lint` job (JDK 21) runs `mvn -P lint test-compile javadoc:javadoc`: main and test sources compile with -Xlint:all and fail on any warning, and javadoc runs with doclint (every group but `missing`) and fails on any warning, so a broken reference or bad HTML in a doc comment fails the PR instead of shipping in the Maven Central javadoc jar. The settings live in a `lint` profile, so the JDK 11/17/21 test matrix is unchanged. MillionSendException now declares serialVersionUID (the only -Xlint finding), set to the value the JVM already computed for it, so its serialized form is unchanged. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 11 +++++++ pom.xml | 31 +++++++++++++++++++ .../com/millionsend/MillionSendException.java | 3 ++ 3 files changed, 45 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e46954..58336c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,3 +22,14 @@ jobs: java-version: ${{ matrix.java }} cache: maven - run: mvn -q -B verify + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + - uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3 # v4.9.1 + with: + distribution: temurin + java-version: '21' + cache: maven + - run: mvn -B -ntp -P lint test-compile javadoc:javadoc diff --git a/pom.xml b/pom.xml index d60e8ac..67fdf30 100644 --- a/pom.xml +++ b/pom.xml @@ -72,6 +72,37 @@ + + + lint + + + + org.apache.maven.plugins + maven-compiler-plugin + + true + + -Xlint:all + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.12.0 + + all,-missing + true + + + + +