From 36181ecbe347a3a94de745055c56106a430fe3d7 Mon Sep 17 00:00:00 2001 From: William Storey Date: Tue, 13 Jan 2026 12:12:21 -0800 Subject: [PATCH] Run checkstyle as separate CI job on Linux with latest Java Move checkstyle out of the test phase and into a dedicated CI job. This allows dependabot to update the checkstyle version and speeds up test runs on Windows/macOS by not running checkstyle there. Checkstyle 13+ requires Java 21+, so we run it on Java 24 on Linux. Co-Authored-By: Claude Opus 4.5 --- .github/workflows/checkstyle.yml | 17 ++++++++++ pom.xml | 57 +++++++++++--------------------- 2 files changed, 36 insertions(+), 38 deletions(-) create mode 100644 .github/workflows/checkstyle.yml diff --git a/.github/workflows/checkstyle.yml b/.github/workflows/checkstyle.yml new file mode 100644 index 00000000..17378795 --- /dev/null +++ b/.github/workflows/checkstyle.yml @@ -0,0 +1,17 @@ +name: Run checkstyle +# Checkstyle 13+ requires Java 21+. +on: [push, pull_request] +permissions: {} +jobs: + checkstyle: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + submodules: true + persist-credentials: false + - uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0 + with: + distribution: zulu + java-version: 24 + - run: mvn checkstyle:check -B diff --git a/pom.xml b/pom.xml index 542fc6cd..384a7f6a 100644 --- a/pom.xml +++ b/pom.xml @@ -127,6 +127,25 @@ + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.6.0 + + true + checkstyle.xml + checkstyle-suppressions.xml + warning + + + + com.puppycrawl.tools + checkstyle + 13.0.0 + + + maven-javadoc-plugin 3.12.0 @@ -340,43 +359,5 @@ - - - checkstyle-jdk21 - - [21,) - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.6.0 - - true - checkstyle.xml - checkstyle-suppressions.xml - warning - - - - com.puppycrawl.tools - checkstyle - 13.0.0 - - - - - checkstyle - test - - check - - - - - - -